Variables working in design mode only

edited November 2010 in FastReport Studio
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

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 12:38AM
    at what point are you calling
    frxReport.Variables := '''' + 'New Report Title' + '''';

    should be after loading and before calling prepare.
  • edited 12:38AM
    Marvelous, that did the trick, thank you very much.
    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]

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.