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 6:01PM
    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 6:01PM
    MANY THANKS.

Leave a Comment