J
John Humble
I'm preparing "MyReport" in Access 2000, to list about a thousand records
sorted in a two-level grouping. There are seven categories in the outer
group and eight categories in the inner group. The report is based on
"MyQuery" and works well.
The reports needs to end with a summary giving an 8 row x 7 column table
indicating the number of records corresponding to each possible
group/sub-group combination. The table must have an 8th column giving row
sums and a ninth row giving column sums. It's generated, including the Row
Sums column but not the Column Sums row, by "MyCrossTabQuery", which is
based on the appropriate fields from "MyQuery". "MySubReport", designed to
be placed in the Report footer of "MyReport", is then based on
"MyCrossTabQuery". This also works well.
However when I try to produce the Column Sums row in "MySubReport", by using
text box controls "MySumData" (control property "=sum([MyData])") in the
subreport footer (just using one column of "MyData" as an example), I get
the "#error" message rather than a numerical result. There are no empty
cells in the column I'm trying to sum. I know that Access can't sum
calculated controls, but in this case the calculations are done in the
CrossTab Query and not in the Report. I've therefore regarded the text box
controls as standard simple text boxes. Is this correct? Can someone
suggest what I'm doing wrong or how to get around the problem? Or am I on
the wrong tack entirely?
TIA
John
sorted in a two-level grouping. There are seven categories in the outer
group and eight categories in the inner group. The report is based on
"MyQuery" and works well.
The reports needs to end with a summary giving an 8 row x 7 column table
indicating the number of records corresponding to each possible
group/sub-group combination. The table must have an 8th column giving row
sums and a ninth row giving column sums. It's generated, including the Row
Sums column but not the Column Sums row, by "MyCrossTabQuery", which is
based on the appropriate fields from "MyQuery". "MySubReport", designed to
be placed in the Report footer of "MyReport", is then based on
"MyCrossTabQuery". This also works well.
However when I try to produce the Column Sums row in "MySubReport", by using
text box controls "MySumData" (control property "=sum([MyData])") in the
subreport footer (just using one column of "MyData" as an example), I get
the "#error" message rather than a numerical result. There are no empty
cells in the column I'm trying to sum. I know that Access can't sum
calculated controls, but in this case the calculations are done in the
CrossTab Query and not in the Report. I've therefore regarded the text box
controls as standard simple text boxes. Is this correct? Can someone
suggest what I'm doing wrong or how to get around the problem? Or am I on
the wrong tack entirely?
TIA
John