Error when accessing Global variables in Functions (6.03)
I declared the variable dow : string in Global-Declarations.
In Global - OnCreate, I set this variable, and do a showmessage just to
check. Works fine.
Declared a function in Global - Programs. This compiles fine, using the dow
variable.
DetailBeforePrint calls the function that tries to access dow.
When I put (in the subfunction):
showmessage('Point 1');
showmessage(dow);
showmessage('Point 2');
It shows "Point 1", but fails when trying to show the contents of dow with
"Cannot genearate report.
Could not run program: DetailBeforePrint".
ReportBuilder Enterprise v6.03 and Delphi 5.0
(We are planning to upgrade to RB7, but haven't got that far. We also need
to consider the customers, that have big problems re-scripting and replacing
the executables every week).
Best Regards,
Paul Wiik, Lynx Technologies
In Global - OnCreate, I set this variable, and do a showmessage just to
check. Works fine.
Declared a function in Global - Programs. This compiles fine, using the dow
variable.
DetailBeforePrint calls the function that tries to access dow.
When I put (in the subfunction):
showmessage('Point 1');
showmessage(dow);
showmessage('Point 2');
It shows "Point 1", but fails when trying to show the contents of dow with
"Cannot genearate report.
Could not run program: DetailBeforePrint".
ReportBuilder Enterprise v6.03 and Delphi 5.0
(We are planning to upgrade to RB7, but haven't got that far. We also need
to consider the customers, that have big problems re-scripting and replacing
the executables every week).
Best Regards,
Paul Wiik, Lynx Technologies
This discussion has been closed.
Comments
More precisely:
After a modification to a Global -Programs - procedure/function, I must go
to Global - declaration and modify the text (to force the variables to be
recompiled or something). Then it works.
Paul Wiik
that help? I would suggest installing RB 7 on a test machine to see if the
problem goes away. We have made modifications to RAP to enhance it and some
bug fixes since RB 6.03 was released.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
Thanks for the answer. I believe I tried that, but it didn't work, so I
added a space, and hit delete to move it, and it worked, but when I now
tried to confirm this, it works all the time! The error is gone.
I completed the report by doing this trick (going into the global variables,
or onBeforePrint as I also discovered made the effect). Now that it's
finalized it works (I only managed to make it fail once after reading your
post).
The only thing I can think of that has changed in the functions/procedures
is that I re-activated some code that was commented out previously.
Ok, hopefully we will have 7.0 installed soon, and it will not be a problem
anymore.
Best Regards,
Paul