TppVariable and PrintToDevices
RB 11.03 Enterprise, Delphi 2007
Hello,
I have a report with a TppVariable (Var1) in the main report, a global
TppVariable (genVar1, reference to Var1) and
3 TppVariables (Var2,Var3,Var4) in the subreport.
GlobalOnCreate:
-----------------
genVar1:=Var1;
Var2.OnCalc:
--------------
Value := Var3.Value+Var4.Value;
genVar1.Value:=genVar1.Value+Value;
When I preview or print the report, all variables Var1-4 are calculated as
expected.
But when I use PrintToDevices to save the generated report in a database an
then print this report with the TppDBArchiveReader,
the value of the variable Var1 is always 0.
Any suggestions?
Regards,
Lars
Hello,
I have a report with a TppVariable (Var1) in the main report, a global
TppVariable (genVar1, reference to Var1) and
3 TppVariables (Var2,Var3,Var4) in the subreport.
GlobalOnCreate:
-----------------
genVar1:=Var1;
Var2.OnCalc:
--------------
Value := Var3.Value+Var4.Value;
genVar1.Value:=genVar1.Value+Value;
When I preview or print the report, all variables Var1-4 are calculated as
expected.
But when I use PrintToDevices to save the generated report in a database an
then print this report with the TppDBArchiveReader,
the value of the variable Var1 is always 0.
Any suggestions?
Regards,
Lars
This discussion has been closed.
Comments
Be sure you call Report.InitializeParameters before you make a call to
PrintToDevices. This will ensure that the GlobalOnCreate is properly fired.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
now it works.
Lars