Run Time SQL Alteration
I need to alter the SQL statement at runtime by using OR statement rather
than And. I can build the SQL based on the parameters selected by user in
dialog screen. Is there anyway to replace the SQL in the report definition
at runtime? If I replace the SQL, will the datase under data tab
automatically refresh to correct sql in case user edits further?
Thanks,
Bob Tucker
than And. I can build the SQL based on the parameters selected by user in
dialog screen. Is there anyway to replace the SQL in the report definition
at runtime? If I replace the SQL, will the datase under data tab
automatically refresh to correct sql in case user edits further?
Thanks,
Bob Tucker
This discussion has been closed.
Comments
You can get access to the SQL of a report at runtime by accessing the
DataModule.DataViews property. From there you can typecast each dataview as
a TdaQueryDataView and access the SQL property. Below is an example on how
to extract and process the SQL object in DADE.
http://www.digital-metaphors.com/tips/ExtractSQLObject.zip
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Thanks,
Bob
getting the sql lines was helpful in getting to the components I needed to
check.
Thanks,
Bob