Set default value for report variables?

hsmhsm
edited 3:03PM in FastReport 4.0
Many of my reports use category variables eg 'Colour1Value' and 'Colour2Value' that I set in Delphi before previewing the report using lines like

FrmSefReportByDept.frxReportFullSef.Variables := Frm_Options.GetGradeColour1;
FrmSefReportByDept.frxReportFullSef.Variables := Frm_Options.GetGradeColour2;
FrmSefReportByDept.frxReportFullSef.ShowReport(true);

However if I preview the report via Ctrl-P when I an designing it (instead of running my program) then of course I get an exception as those Delphi lines are not run and the variables have no value.

Is there a way to set a default value so I can see what the report looks like while designing it without having to compile and run my entire Delphi program every time?

Comments

  • gpigpi
    edited 3:03PM
    Enter default value in Expression box of variables editor
  • hsmhsm
    edited 3:03PM
    gpi wrote: »
    Enter default value in Expression box of variables editor
    Thank you! I've spent two years wondering if that was possible! That saves a lot of time.

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.