I have a report based on a query (which is based on other queries and tables). The output of the query has a record for each employee and subprogram (sprg). Each sprg has more than 1 employee. All but 3 of the many fields come out okay on the report.
The report has detail information for each employee, and is sorted by sprg and employee. The dollar fields are subtotalled at the sprg level. That works fine. I also want grand totals for the whole report. This works fine except for the 3 fields in question. These 3 fields only exist at the sprg level. I put them in the query by using “First” in the “total” row of the design grid. I can have it print the sprg subtotal on the report by putting FirstOfRegTO (where RegTO is the name of one of the 3 fields in question) in the Control Source of a text box in the sprg footer. That works fine.
In my test sample, I have 3 records. The following are the relevant fields:
Name.......Sprg..........FirstOfRegTO
John.........5210.........$5,091.00
Mary.........5210.........$5,091.00
Sue..........5310........$13,713.00
On my report, I correctly show $5,091.00 as the sprg subtotal for sprg 5210 and $13,713.00 as the sprg subtotal for sprg 5310. But I can’t get $18,804 as the grand total of RegTO for the report. I’ve tried many things.
I thought I could do something by summing the sprg subtotals by using the Name of the sprg subtotal text box, but that doesn’t work, or I’m not doing it right. I did “=[Reports]![1FedSprg]![Mark]” where "1FedSprg" is the name of the report and “Mark” is the name of the text box. This gives me the last sprg subtotal, which makes sense but isn't what I want. When I add a Sum to it by doing “=Sum([Reports]![1FedSprg]![Mark])” I get a blank.
If you have any suggestions, I’d appreciate it.
The report has detail information for each employee, and is sorted by sprg and employee. The dollar fields are subtotalled at the sprg level. That works fine. I also want grand totals for the whole report. This works fine except for the 3 fields in question. These 3 fields only exist at the sprg level. I put them in the query by using “First” in the “total” row of the design grid. I can have it print the sprg subtotal on the report by putting FirstOfRegTO (where RegTO is the name of one of the 3 fields in question) in the Control Source of a text box in the sprg footer. That works fine.
In my test sample, I have 3 records. The following are the relevant fields:
Name.......Sprg..........FirstOfRegTO
John.........5210.........$5,091.00
Mary.........5210.........$5,091.00
Sue..........5310........$13,713.00
On my report, I correctly show $5,091.00 as the sprg subtotal for sprg 5210 and $13,713.00 as the sprg subtotal for sprg 5310. But I can’t get $18,804 as the grand total of RegTO for the report. I’ve tried many things.
I thought I could do something by summing the sprg subtotals by using the Name of the sprg subtotal text box, but that doesn’t work, or I’m not doing it right. I did “=[Reports]![1FedSprg]![Mark]” where "1FedSprg" is the name of the report and “Mark” is the name of the text box. This gives me the last sprg subtotal, which makes sense but isn't what I want. When I add a Sum to it by doing “=Sum([Reports]![1FedSprg]![Mark])” I get a blank.
If you have any suggestions, I’d appreciate it.