Using DBCalc in master detail
L.S.,
I have u problem with de calculation of a grand total in a master detail
detail report. The structure of the report is;
Masterdata in header
details in detail band
subreport with the details from the details
I use a DBCalc component in the summaryband of the main report for an amout
field in detail/detail table.
However the sum displayed is only the sum of the first detail/detail
records of the detail.
Masterinfo
detail 1
10
20
detail 2
30
15
Sum shout be: 75
DBCalc displays: 40
Howe do I solve this?
regards,
Ton
I have u problem with de calculation of a grand total in a master detail
detail report. The structure of the report is;
Masterdata in header
details in detail band
subreport with the details from the details
I use a DBCalc component in the summaryband of the main report for an amout
field in detail/detail table.
However the sum displayed is only the sum of the first detail/detail
records of the detail.
Masterinfo
detail 1
10
20
detail 2
30
15
Sum shout be: 75
DBCalc displays: 40
Howe do I solve this?
regards,
Ton
This discussion has been closed.
Comments
When calculating a running total inside the main report from a subreport,
the best method is to keep track of the running total inside the subreport
itself using the OnCalc event of a TppVariable. Then updating another
TppVariable inside the main report.
Take a look at the following example on how this should be done.
http://www.digital-metaphors.com/rbWiki/Delphi_Code/Calculations/How_To...Display_Subreport_Totals_in_the_Main_Report
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com