Displaying variables
I am successfully declaring variables in my Fast Report via Delphi, before showing the design window.
In the report, I simply click on the variable in the Data Tree, and drag it onto a band (in my case the page header).
When I preview the report I get an error looking something like this:
ReportName: Error in expression 'XXX': ';' expected
(ReportName is my variable name, XXX would be whatever value I have in the report).
Any ideas on what I am doing wrong?
Thanks in advance
-Graeme
In the report, I simply click on the variable in the Data Tree, and drag it onto a band (in my case the page header).
When I preview the report I get an error looking something like this:
ReportName: Error in expression 'XXX': ';' expected
(ReportName is my variable name, XXX would be whatever value I have in the report).
Any ideas on what I am doing wrong?
Thanks in advance
-Graeme
Comments
event handler.
I was getting the error at run time, and have just figured out it was a simple RTFM case.
The help doc has a note about adding string variables like this:
FastReport.Variables[sVarName] := '''' + sVarValue + '''';
whereas I was adding string variables like this:
FastReport.Variables[sVarName] := sVarValue;
Thanks again for taking the trouble to answer me.