Hi,
I am trying to retrieve underlying SQL statements for my Crystal Reports via Java RAS code. I seem to be close by:
1) Opening Crystal Report as a ReportClientDocument
2) Using getRowSetController() to create row set controller
3) Using getSQLStatement as follows:
GroupPath gp = new GroupPath();
String crySQL = null;
RowsetController rsControl = crystalReport.getRowsetController();
rsControl.getSQLStatement(gp, crySQL);
System.out.println("crySQL: " + crySQL);
The issue is nearly all of my Crystal reports return the error:
"ReportSDKServerException: Fetching SQL statements is not supported for this report.---- Error code:-2147217387 Error code name:connectServer"
Those that don't return NULL for the SQL Statement. Is there something I am missing? Why is fetching SQL statements not supported? Also - what is the significance of the GroupPath object?
Thanks!