Results 1 to 2 of 2
Thread: sub-reports (2000)
2005-05-07, 00:33 #1
- Join Date
- Mar 2005
- Thanked 0 Times in 0 Posts
I am trying to add 3 figures from my main report to the sub report (cost_qry) and using the expression builder I came up with
=[p1 Grand Total Sum]+[Text116]+[Text117]+[cost_qry].Report![p1 Grand Total Sum]
which works after a fashion, in that it prompts for [cost_qry].Report![p1 Grand Total Sum] and [p1 Grand Total Sum] as parameters, pressing enter twice allows the report to run and correctly arrives at the total, but as I effectively want a total for each month in a year I don't want to press enter 24 times etc.
any ideas ? (probably really easy)
2005-05-07, 05:19 #2
- Join Date
- Jun 2002
- Mt Macedon, Victoria, Australia
- Thanked 45 Times in 44 Posts
Re: sub-reports (2000)
I think you have made a mistake using the expression builder.
You say you want to add three items from the main report, and put the total in the subreport (called cost_qry) yet your expression includes 4 items, one of which is on the subreport.
I suggest you try to add the three items within the main report. Create a new unbound text box, and set its control source to the sum of the three items you want to add, using the expression builder.
When that works, use the expression builder to transfer the result to the subreport. If you are working within the subreport, the expression builder should include Reports! and the name of the report in the reference to the control. If the control is on the current report (or form) you can leave this out.Regards