Wrong subreport page total in mainreport footer
Hello,
I have a master-detail database relation.
I need a subreport total at the bottom of each page. The subreport has
sometimes a10 or more pages.
In the Main report I have a global variable and a variable in the footer to
display the total of the page.
Declaration : xZwischensumme : Currency;
Variable in Footer (string) : value := FormatFloat('#,##0.00 ?,
xZwischensumme),
Timing: Calc: Datapipeline plDetail, Reset: reportend
In the subreport I have the code to compute the total:
xZwischensumme := xZwischensumme +
plDetail['Preis']+plDetail['Zusatz'];
I put this calculation:
1. in the before print event of the detail band of the subreport:
Result is: often RB adds the first line of the next page. So the results of
the pages are much too high.
2. in the after print event of the detail band of the subreport:
Result is: often RB adds sometimes the first line of the next page. So the
results of the pages are too high.
3. in a variable in the detail band, in the on calc event,
Timing: Calc: Datapipeline traversal, Reset: reportend
Result is: the first totals are ok, but on the last page of the detail band
RB does not calculate the total for the LAST line of the subreport,
at least if the subreport summary is broken to the following page. So the
total is too low.
I use Delphi 5 SP 1 Enterprise and RB 7.03
Thanks a lot for help!
Heinrich Karl Puff-Hippchen
eMail: Mailto:PuffHippchen@t-online.de
I have a master-detail database relation.
I need a subreport total at the bottom of each page. The subreport has
sometimes a10 or more pages.
In the Main report I have a global variable and a variable in the footer to
display the total of the page.
Declaration : xZwischensumme : Currency;
Variable in Footer (string) : value := FormatFloat('#,##0.00 ?,
xZwischensumme),
Timing: Calc: Datapipeline plDetail, Reset: reportend
In the subreport I have the code to compute the total:
xZwischensumme := xZwischensumme +
plDetail['Preis']+plDetail['Zusatz'];
I put this calculation:
1. in the before print event of the detail band of the subreport:
Result is: often RB adds the first line of the next page. So the results of
the pages are much too high.
2. in the after print event of the detail band of the subreport:
Result is: often RB adds sometimes the first line of the next page. So the
results of the pages are too high.
3. in a variable in the detail band, in the on calc event,
Timing: Calc: Datapipeline traversal, Reset: reportend
Result is: the first totals are ok, but on the last page of the detail band
RB does not calculate the total for the LAST line of the subreport,
at least if the subreport summary is broken to the following page. So the
total is too low.
I use Delphi 5 SP 1 Enterprise and RB 7.03
Thanks a lot for help!
Heinrich Karl Puff-Hippchen
eMail: Mailto:PuffHippchen@t-online.de
This discussion has been closed.
Comments
Please send an example .rtm file demonstrating the issue in .zip format to
support@digital-metaphors.com and I'll take a look at it for you.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com