View Full Version : Subtotal problem on a report


dbadminnewbie
11-06-2007, 10:49 AM
I have a report with a calculated field on each line [price_ext] that has as one of it's components a calculated field [Factor]

Price_ext is calculated as: [Ord_Qty]*[UnitPrice]*[Factor]

Factor is determined by: IIF ([SpeciesID] = 1, [formfactor1], [formfactor2])

Up to here, it works fine, I get the extended price per line

But when I try to total at the end of the report, I a box pops up asking for parameters for [Price_ext] if I use Sum([Price_ext]) as a formula.

What other options are there?

pbaldy
11-06-2007, 10:52 AM
You can't sum a calculated control. Either recreate the calculation in the report footer:

Sum(price * qty)

Or create a second hidden textbox in the detail with its running sum property set appropriately, and refer to that textbox in the footer.

dbadminnewbie
11-06-2007, 11:08 AM
Thanks!

Using the running sum on a hidden textbox worked like a charm