Retrieving Crystal Reports SQL query

R_K_T_ASHOKA

Active member
Joined
Apr 6, 2006
Messages
33
Programming Experience
3-5
Hi

I am trying to get the sql query of a crystal reports file through code, I tried using the following line of code...

VB.NET:
strSQL = CR.SQLQueryString

where CR is the CRAXDRT.Report object present in "Crystal Reports ActiveX Designer Run Time Library 11.0"

As we know a db connection to the db used by the reports is needed for the above operation.
The code above mentioned works fine if the db login used in the rpt file uses blank password, but throws an error if db login has a non-blank password, this is because of the reason that db login passwords are not stored in Crystal reports file.

I know that we can use the "LogonServer()" method of CRAXDRT.Application object and set the connection info that is used by the report, but I am not able to find any good documentation for the same method. Please let me know if anyone knows any good/official documentation for "Crystal Reports ActiveX Designer Run Time Library 11.0".

Can we retrieve the SQL query used by a report using "Crystal Reports for .Net" - CrystalDecisions.CrystalReports.Engine namespace. Also how to set connection info in this.


Thanks
 
Back
Top