Home General

SQL Query at run time in reports

edited June 2001 in General
I need to design a report which will be tied to a SQL query. I need to issue
the query at run time when user clicks on a button.

At what stage during print generation do I call the query
How do I map the DBText fields with the returned query fields.

I already have a report which is connected to TTable. I want to replace it
with a query


  • edited June 2001

    At design time, create the SQL Query and make it active. Switch the
    DataSource that is currently connected to the TTable, so that is
    references the TQuery.

    If the FieldNames are the same then the report may not require any
    modifications. You can easily check this by previewing the report.

    At run-time, you can either open the Query prior to calling Report.Print
    or you can let RB open the query for you.

    Best regards,

    Nard Moseley
    Digital Metaphors
  • edited June 2001
    You can't set active property to true if sql property is empty. Please read
    my message again. I am creating the query at run time.

This discussion has been closed.