How do you modify the SQL statement that is generated within a Crystal Reports file (.RPT)? I would like to alter the WHERE clause that is generated inside the Crystal Report which was loaded via the CrystalDecisions.CrystalReports.Engine.ReportDocument object.
I realize that the RecordSelectionFormula property can be used, BUT the string that is generated from the original SQL WHERE subclause within the Crystal Report becomes formatted in a non T-SQL format. In order to modify this property effectively, one would have to create a string that adheres to the that property's recognizable format.
I was able to obtain the SQL statement generated from the Crystal Report (ReportDocument object) using the ISCDReportClientDocument and RowsetController objects and GetSQLStatement() method.
What are the objects and methods that can be used to update (modify) and refresh the SQL within the ReportDocument object for the Crystal Report?
Thanks,
Eric