Report.FirstPass Problem
hi,
I need to use a value of a global variable in the first pass to get
its last value ( to make % ) but with le Report.firstPass clause, i
get its last value of the last page, but i need the value at the end
of each page or group.
my code :
Procedure PCMaiOnPrint;
var
temp : integer;
begin
if report.firstpass then
begin
temp := totalmai; { totalMai is the variable }
end
else
PCmai.value := totalmaimission / temp * 100;
thanks in advance.
I need to use a value of a global variable in the first pass to get
its last value ( to make % ) but with le Report.firstPass clause, i
get its last value of the last page, but i need the value at the end
of each page or group.
my code :
Procedure PCMaiOnPrint;
var
temp : integer;
begin
if report.firstpass then
begin
temp := totalmai; { totalMai is the variable }
end
else
PCmai.value := totalmaimission / temp * 100;
thanks in advance.
This discussion has been closed.
Comments
1. You should only make calculations inside the TppVariable.OnCalc event.
This event in guaranteed to only fire once per traversal.
2. Check the timing of the TppVariable you are updating. If you need it to
reset on each page, be sure to set it to do so. This can be changed using
the "Timing" dialog of the TppVariable from its popup menu.
3. Be sure you have the LookAhead property set to True when you place your
accumulating variable.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com