variables default value
Hello,
I have a variable that is set by Delphi and therefore is "null" when I try to show the preview within the FR form.
Because the value is undefined, I only get an "expression expected" error.
Can I set a default value that is used as long as the value is not set from extern?
I tried:
in the BeforePrint Method and by this the report is generated and correctly shown, but still showing the error, because RepTitel is undefined in the try part of the exception.
I have a variable that is set by Delphi and therefore is "null" when I try to show the preview within the FR form.
Because the value is undefined, I only get an "expression expected" error.
Can I set a default value that is used as long as the value is not set from extern?
I tried:
  try     Â
  dummy := <RepTitle>; Â
except                 Â
    Set('RepTitle', '''Titel''');
end;
in the BeforePrint Method and by this the report is generated and correctly shown, but still showing the error, because RepTitel is undefined in the try part of the exception.
Comments
I must set this value without delphi. When I design a report, which uses Variables, that later will be set by delphi and currently have no value, then I want to set a defualt value in FastReport directly, to be able to preview the design without the need to compile and run the delphi application.