showing variables in preview window

Hello,

I have a question relating to the use of variables

In the designer I have a text object with in it the text [MyVariable].

I am able to assign a value to that variable from the delphi main program, via the frxReport1GetValue method, and also via the frxReport1.Variables:=10 method.

But in the designer I am not able anymore to use the preview (Ctrl P). I get the error message 'Undeclared identifier 'MyVariable''. Logical: the preview window has no way of knowing its value.

So how should I proceed in order to be still able to use the preview?

I guess I need to add a variable via the menu Report | Variables and assign a dummy value to it, I guess in the 'Expression' field. But what expression should I use? (I cannot refer to a database field since I am not using databases).


Comments

  • gordkgordk St.Catherines On. Canada.
    edited 10:46PM
    When using a categorized variable in a memofield in the report you must give it a default value if you wish to preview from the design environment without runining the .exe file.
    the onget value event is external to the report and requires a running program to provide values.
    other than that the method to design can be run from the .exe by calling design report.
  • edited 10:46PM
    Yes, but how to give it a default value?
  • gordkgordk St.Catherines On. Canada.
    edited 10:46PM
    in design mode when you create the variables
    mnu>variables after creating the variable put a value in the expression box at the bottom of the variable creation page.
    or from delphi create the variables before calling design report;
  • edited 10:46PM
    Thanks

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.