Global Vars
fields24
Tennessee
All,
In creating a report I am declaring global vars under the head of the code
under the var keyword: StartDay : Integer; WorkCodes : string;, etc
On selecting preview while in the editor the correct output appears.
But when running the application I get the error above.
There is one line of code in Delphi 7 that I am executing the frxReport
GetValue procedure: It performs a AnsiCompareText on the field that is
found if it is WorkCodes. It merely passes a string value. It never gets to
this line of code anyway.
What is going on? I have reinstalled Delphi 7 Pro, reinstalled FastReports 3.24 Pro
several times and still get the error. It worked several weeks ago with the same
application.
Using: Windows XP Pro SP2, Delphi 7 Pro, FastReports 3.24, IBObjects 4.7.16
Steve Fields
In creating a report I am declaring global vars under the head of the code
under the var keyword: StartDay : Integer; WorkCodes : string;, etc
On selecting preview while in the editor the correct output appears.
But when running the application I get the error above.
There is one line of code in Delphi 7 that I am executing the frxReport
GetValue procedure: It performs a AnsiCompareText on the field that is
found if it is WorkCodes. It merely passes a string value. It never gets to
this line of code anyway.
What is going on? I have reinstalled Delphi 7 Pro, reinstalled FastReports 3.24 Pro
several times and still get the error. It worked several weeks ago with the same
application.
Using: Windows XP Pro SP2, Delphi 7 Pro, FastReports 3.24, IBObjects 4.7.16
Steve Fields
Comments
now on a recompile, without changes, does not work?
Also, on a newly created report, without global variables
the report works until I add a snip of code like below?
if (<LINE#> mod 2) = 0 then
Line1.Visible := True
else
Line1.Visible := False;
I have a defined variable in the Header Line, [STARTDATE]
so it will not preview, I have to actually run the application.
But when it comes to OnGetValue and finds STARTDATE it
chokes with:
Incompatible types: 'Class String', 'String'
There is only the code listed above in the report and the code
below in the Delphi (OnGetValue) code:
if AnsiCompareStr(VarName, 'STARTDATE') = 0 then
Value := FormatDateTime('mm/dd/yyyy', Now);
Steve Fields
I really like your software and use it heavily. I am just trying
to track down where I have messed up or a reinstall has gone
wrong.
don't forget delphi strips string delimiters so you must add extras when passing strings into categorized variables.