Calculating the grand total from subtotals in a subreport
Hi,
I have a subreport with a TppDBCalc component which calculates the sum of a
field in that subreport. On the main report i'd like to display the sum of
those subtotals (displayed in the subreport). How can i do that?
I tried to use a TppVariable (with Timing for CalculateOn set to Traversal)
in the main report, but i encountered two problems:
- the varable is calculated before the DBCalc component in the subreport is
(causing a wrong result of the total)
- if i display a page more than once, the subtotals on that page are
considered more than once (causing a wrong (too big) total result).
Any suggestions?
Thanx
I have a subreport with a TppDBCalc component which calculates the sum of a
field in that subreport. On the main report i'd like to display the sum of
those subtotals (displayed in the subreport). How can i do that?
I tried to use a TppVariable (with Timing for CalculateOn set to Traversal)
in the main report, but i encountered two problems:
- the varable is calculated before the DBCalc component in the subreport is
(causing a wrong result of the total)
- if i display a page more than once, the subtotals on that page are
considered more than once (causing a wrong (too big) total result).
Any suggestions?
Thanx
This discussion has been closed.
Comments
Check out the following example of calculating a grand total using
subreports and only Variables rather than Variables and DBCalcs.
http://www.digital-metaphors.com/tips/TotalsFromSubReport.zip
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
BTW, is it possible to get all of the examples, because if i go to
http://www.digital-metaphors.com/tips/ it's not possible to browse the
directory.
Thanx again
The "tips" directory is generally used to provide users of the newsgroups a
way to download examples that we create specifically for them. Most of the
examples located in Tips are customized for a specific user or a specific
question. It is on our to-do list to some day organize this directory and
provide a knowledge base for all ReportBuilder users.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com