Retrieving queries from webI reports in Business Objects

2.4k Views Asked by At

Is it possible to retrieve the SQL queries from a report in business objects using the SDK.

Any tutorials or code would be useful.

regards, nithen

1

There are 1 best solutions below

0
On BEST ANSWER

I'll assume you know how to get a WebI DocumentInstance object via the Java SDK.

DocumentInstance docInst; // get your DocumentInstance object via preferred route
DataProvider dp = docInst.getDataProviders().getItem(0); // retrieve the DataProvider that you would like the SQL for
String sql = dp.getQuery().getSQL(); // the SQL out of the DataProvider

getSQL() is depreciated so it may vanish in the next version