How to transfer parameters to FR?

Hello,

I designed a report, place a ADO/BDE component and several Query components on the report, while the connection string/alias are to be got at runtime, and the query's script are also to be set runtimely.

I don't know how to do?

Thks.

Comments

  • edited 8:55AM
    We are using "Variables"...

    From FR Editor: Menu Report -> Variables. It appears as "code snipsets", so you can write
    if <some_condition> then
      ReportDataSet.ConnectionString := <variable_connection_string>;
    

    From Delphi:
    1) load report
    2)
    FastReportObject.Variables['some_condition'] := 'true';
    FastReportObject.Variables['variable_connection_string'] := '''your connection string here''';
    
  • edited 8:55AM
    MANY 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.