Skip to Content
Jun 16 at 01:12 PM

Would like to get SQL statments for multiple table - non command crystal report 2020?

251 Views Last edit Jun 16 at 06:42 PM 2 rev


I need to convert CR 11.5 to CR 2020. We have opened CR 11.5 reports in CR 2020 designer. When we integrate the CR 2020 reports using SP 32 .NET runtime engine. It is not working for multiple table reports, Only working for single table reports. We have looked into it and found that getSQLstatement is failing in multiple table reports and we have seen in the SAP and other forum says to convert the command based object for multiple table reports. If we convert command based then this will be a major work for us need to re-wiring all the fields for command based and need to involve good number of changes into client code side and also we need to educate to customer for converting custom reports. If it is possible to get a SQL statement for multiple table reports without making command object based will make life easier.

The below is the one of the sample code which we have tried and got failed... Can you please make my life easier.

<code>    var reportDocument = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
    reportDocument.Load(file);<br>    var controller = reportDocument.ReportClientDocument.RowsetController;<br>    var groupPath = new CrystalDecisions.ReportAppServer.DataDefModel.GroupPath();
    string sqlStatment = String.Empty;
    string commandSql = controller.GetSQLStatement(groupPath, out sqlStatment);<br><br>