I tried to get the Cascading Query from WebI reports version 3.1 (see the below code for reference) but this code is not fetching all queries.
SQLDataProvider sqldp;
SQLContainer sqlcntr = null;
int containerCnt = 0;
SQLNode sqlnode = null;
SQLSelectStatement SqlSel = null;
String sqlStatement = null;
if (dp instanceof SQLDataProvider)
{
sqldp = (SQLDataProvider) dp;
if (sqldp.isCustomSQL())
{
sqlcntr = sqldp.getSQLContainer();
// sqlcntr = sqldp.getSQLContainer(false);
if (sqlcntr != null )
{
//containerCnt = sqlcntr.getChildCount();
sqlnode = (SQLNode) sqlcntr.getChildAt(0);
SqlSel = (SQLSelectStatement) sqlnode;
sqlStatement = SqlSel.getSQL();
}
}
}
I also tried with "getSQLContainer(false)" but it fails to provide DataProvider. Suggest any way to get the Cascading queries.