Variables working in design mode only
Hi all
My variable woes continue. Hopefully someone can give some pointers on this one because I've hit a brick wall.
I am adding variables, from within Delphi, to be displayed on the report (like the report title and date range). I must be doing something correct because when I go into design mode the values are there.
But when I run the report using frxReport.ShowPreparedReport to view the report, (after running the PrepareReport method) the values remain what they were when I designed the report. They don't change.
So if the variable called 'ReportTitle' was 'Sales Summary' when I designed the report, it remains as that even if I use
frxReport.Variables := '''' + 'New Report Title' + '''';
If I use that command before designing the report, the new report title 'comes through'.
Am I missing something?
Thanks in advance
-Graeme
My variable woes continue. Hopefully someone can give some pointers on this one because I've hit a brick wall.
I am adding variables, from within Delphi, to be displayed on the report (like the report title and date range). I must be doing something correct because when I go into design mode the values are there.
But when I run the report using frxReport.ShowPreparedReport to view the report, (after running the PrepareReport method) the values remain what they were when I designed the report. They don't change.
So if the variable called 'ReportTitle' was 'Sales Summary' when I designed the report, it remains as that even if I use
frxReport.Variables := '''' + 'New Report Title' + '''';
If I use that command before designing the report, the new report title 'comes through'.
Am I missing something?
Thanks in advance
-Graeme
Comments
frxReport.Variables := '''' + 'New Report Title' + '''';
should be after loading and before calling prepare.
Maybe if the help file writer is reading this he could make a note [img]style_emoticons/<#EMO_DIR#>/wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" /> (or maybe my help file is just out of date) Thanks again for the quick reply. -Graeme[/img]