Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I retrieve the SQL Query from the report

Status
Not open for further replies.

adasoft

Programmer
Jan 31, 2002
132
IN
Hi,
I've designed my reports in Crystal 8.5. My reports are connecting to SQL Server 7 database & my front end application is VB 6 with Crystal RDC control's runtime library classes & functions for previewing the reports.
My reports has a lot of parameter fields in the main and it's subreports. They are linked to the SQl Query in Report Record selection formula. I am setting the parameter field values at runtime for both main & the sub reports. Now I want to extract the final SQl Query string from the report(Report.SQLQueryString). But this returns the SQL without the parameters values, ie the default query. I tried extracting the RecordSelectionFormula also, but it is the one I put in the design mode. How can I extract the final SQL Query. When I run the report I am getting the correct filtered result. When actually is this parameter field values applied to the SQL Query. Is filtering applied after fetching data from the database or at the time of fetching data ? I even tried to extract the query, after previewing the report, but in vein.

Please help me in retrieving the SQL Query from the report.

Thanks in advance

Adasoft
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top