summary totals on first page
I have a multi level report that begins with a summary page from
calculations derived on the subsequent subreports (column totals).
The totals in the details sections are always correct, however, the
totals on the summary page (page 1) are not.
This first page uses labels and the variables in the summary set those
labels like this in the 'OnCalc' event.
sum := FindComponent('lblOnFirstPage');
if sum <> nil then
TppLabel(sum).Text := TppDBCalc(sender).Value;
What is the best way to get these totals copied to the front page?
Thanks
Jim
calculations derived on the subsequent subreports (column totals).
The totals in the details sections are always correct, however, the
totals on the summary page (page 1) are not.
This first page uses labels and the variables in the summary set those
labels like this in the 'OnCalc' event.
sum := FindComponent('lblOnFirstPage');
if sum <> nil then
TppLabel(sum).Text := TppDBCalc(sender).Value;
What is the best way to get these totals copied to the front page?
Thanks
Jim
This discussion has been closed.
Comments
The easiest way to place calculations at the beginning of a report is to
use LookAhead values. This will make the calculations during the first
pass of the report and display them during the second pass.
Ideally you will just use TppVariables and their OnCalc events in your
title page. If you set the LookAhead property to True, the OnCalc event
of the variables will fire and update its value as if it were lower down
in the report.
See Demo 18 for an example of how lookahead components can work located
in the \Demos\1. Reports\... directory.
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
in other calculations.
http://www.digital-metaphors.com/rbWiki/Delphi_Code/Calculations/How_To...Use_a_Look_Ahead_Value_in_a_Calculation
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com