I have an End-User application which permits the user to build a query (using the Data tab) and create its own report. Is there a way I can access this query by code ?
You can access this query in the Report.Template.OnLoadEnd event after the datamodule is instantiated. You could easily reference the Report.Datapipeline.DataSource.Dataset as a query object. If you want to loop through the datapipelines in the dataviews. This example shows how to get the datamodule and then loop through the dataviews. You can ignore the SQL object stuff, and just get the pipelines using this code: http://www.digital-metaphors.com/tips/ExtractSQLObjects.zip
Comments
You can access this query in the Report.Template.OnLoadEnd event after the
datamodule is instantiated. You could easily reference the
Report.Datapipeline.DataSource.Dataset as a query object. If you want to
loop through the datapipelines in the dataviews. This example shows how to
get the datamodule and then loop through the dataviews. You can ignore the
SQL object stuff, and just get the pipelines using this code:
http://www.digital-metaphors.com/tips/ExtractSQLObjects.zip
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
The link was wrong, it should be
http://www.digital-metaphors.com/tips/ExtractSQLObject.zip
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com