Rave Param Equivalent in FR

I am converting from Rave to Fast Reports.
My rave project has a number of parameters which are set programatically from a Delphi form :
eg:
rvProject.SetParam('lblCriteria',rsCriteria);

This sets a parameter in the rave project which I then use in a data text component on the report.
I set the component's DataField property to Param.lblCriteria

What is the equivalent in Fast Reports?

Comments

  • edited 6:38PM
    I prefer to use TfrxReport.OnGetValue
  • edited 6:38PM
    I can't find an OnGetValue Event on my report.
    I created one like page 33 or the Programmers Manual:

    procedure TForm1.frxReport1GetValue(const VarName: String;
    var Value: Variant);
    begin
    if CompareText(VarName, 'My Variable') = 0 then
    Value := 'test'
    end;

    and on the report:
    create the report and lay the "Text"
    object to it. Type the following text in this object:
    [My Variable]


    But when I run the report it says error in expression 'My Variable': ';' expected.
  • gordkgordk St.Catherines On. Canada.
    edited December 2011
    You must create the variiable in the categorized variable list
  • edited December 2011
    I have not referred to TfrxReport.OnGetValue from the report but from the source.
    TForm1.frxReport1GetValue is assigned to TfrxReport.OnGetValue from your source.
    I do not create the variable in the report and it works.
    But you can not use spaces in variable names.
    "MyVariable" is OK, but "My Variable" is not.

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.