Initialize Global Variables
Hi,
I am using Delphi 5 and RB 6.03.
I have a global variable X that is an
integer that I use in calculations.
I initialize it in the initialize of global
variables. I run the run the report.
It previews correctly. I then press
the print and the numbers are
doubled. when it prints.
I put a ShowMessage in the initialize
of the global variables and it shows up
when I preview but not again when I
print.
I am able to work arround it but I think
it should call the initialize every time
you run the report. Not just the first
time or have I missed something?
Thanks,
Joseph Gordon.
I am using Delphi 5 and RB 6.03.
I have a global variable X that is an
integer that I use in calculations.
I initialize it in the initialize of global
variables. I run the run the report.
It previews correctly. I then press
the print and the numbers are
doubled. when it prints.
I put a ShowMessage in the initialize
of the global variables and it shows up
when I preview but not again when I
print.
I am able to work arround it but I think
it should call the initialize every time
you run the report. Not just the first
time or have I missed something?
Thanks,
Joseph Gordon.
This discussion has been closed.
Comments
values and store them as the repor tis running. Use the variable's OnCalc
event for the proper timing. You are getting extra numbers because the bands
may get a chance to print on two pages. Sometimes it has to generate in
order to determine that it couldn't fit on the previous page, so it
regenerates on the next page as if the previous calc didn't happen. The
report engine makes sure that the TppVariables are in sync with the
generation process so that calcs are correct.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com