how to set a variable
I'm a new user of FastReports.
I have a C++ application that accesses an ODBC database. I have created a Report in the FastReport Designer.
I am using the FastReport ActiveX object in the C++ application. I have been able to view a Report successfully in the C++ App
but it is displaying all the data in the database tables.
I need to be able to limit the data that is displayed by passing or setting a variable from the C++ app for the Report.
Checking the FastReport documentation I found the SetVariable() function.
How do I set a variable from the C++ application so that only data for a particular TableID in the main table in the database is displayed.
In this application it saves data for different types of Trucks. I want to be able to view data in the various tables in the database for only one Truck that is identified by its TruckID
Can this be done using the SetVariable() option in FastReports ?
Thanks for any help.............
Patrick
I have a C++ application that accesses an ODBC database. I have created a Report in the FastReport Designer.
I am using the FastReport ActiveX object in the C++ application. I have been able to view a Report successfully in the C++ App
but it is displaying all the data in the database tables.
I need to be able to limit the data that is displayed by passing or setting a variable from the C++ app for the Report.
Checking the FastReport documentation I found the SetVariable() function.
How do I set a variable from the C++ application so that only data for a particular TableID in the main table in the database is displayed.
In this application it saves data for different types of Trucks. I want to be able to view data in the various tables in the database for only one Truck that is identified by its TruckID
Can this be done using the SetVariable() option in FastReports ?
Thanks for any help.............
Patrick
Comments
Use query components to only extract the data you want and then report on that.
Even if you could restrict the data from within FR what are you going to do if someone asks for a report with a different sort order or grouping?
Queries are by far the most flexible way to extract and deal with data for reporting. Joining tables, filtering and sorting are all very easy to do.