cancel
Showing results for 
Search instead for 
Did you mean: 

To get List of Object used in Reports

Former Member
0 Kudos

Hi Team,

Do we have any SDK where we can get the list of objects used in reports.

Env:BO XI 3.1

Regards,

Shiva Gunturu

Accepted Solutions (1)

Accepted Solutions (1)

DellSC
Active Contributor
0 Kudos

Webi or Crystal?

For Webi, you need to use the Report Engine SDK.  For Crystal you need to use IReportDocument from the regular Java SDK.

-Dell

Former Member
0 Kudos

It's Webi.

Regards,

Shiva Gunturu

Former Member
0 Kudos

This might help

List objects used in Web Intelligence reports

Thanks,

Prithvi

Former Member
0 Kudos

Thanks for the reply above link is not working at my got one kb article for the same.

can we try the same

1645521 - How to get list of objects used in Web Intelligence report using Java SDK?

Former Member
0 Kudos

Hi Shiva,

The code in the SAP Note will also work. However, it would just work for XI 3.1 Version and not BI 4.x as those features are deprecated from Report Engine SDKs for BI 4.x.

You can follow below steps to deploy the code.

  1. Go to Tomcat Installation Directory. (<BusinessObjects Install Directory>\Business Objects\Tomcat)
  2. Now go to webapps folder in tomcat directory (<BusinessObjects Install Directory>\Business Objects\Tomcat\webapps).
  3. Create a new application folder within webapps (ex. Test)
  4. Create a new folder named ‘WEB-INF’ within ‘Test’ Folder. (<BusinessObjects Install Directory>\Business Objects\Tomcat\webapps\Test\WEB-INF)
  5. Copy the jar files from the ‘lib’ folder from the mentioned location: (<BusinessObjects Install Directory>\Business Objects\common\4.0\java\lib) and paste it to (<BusinessObjects Install Directory>\Business Objects\tomcat\Test\WEB-INF \lib)
  6. Copy the ‘external’ folder from the mentioned location: (<BusinessObjects Install Directory>\Business Objects\common\4.0\java\lib\external) and paste it to (<BusinessObjects Install Directory>\Business Objects\tomcat\Test\WEB-INF \lib)
  7. Place your all jsp files at the following location (<BusinessObjects Install Directory>\Business Objects\Tomcat\webapps\Test\index.jsp)

Restart the tomcat application server and execute, for example

http://<server>:<port>/Test/createdFile.jsp

Thanks,

Prithvi

Former Member
0 Kudos

below is the code helped us.


created a jsp file with below code and copied the same to the kept in AnalyticalReporting folder and had run we got the list of objects present.


<html>
<head><title>List of Webi reports with its objects</title></head>
<body>
<%@ page import="com.crystaldecisions.sdk.framework.*,
               com.crystaldecisions.sdk.occa.infostore.*,
            com.businessobjects.rebean.wi.*"
%>
<table border = 1>
<%
String username = "";
String password = "";
String cmsname = "";
String authtype = "secEnterprise";
IEnterpriseSession oEnterpriseSession=null;
try
{
oEnterpriseSession = CrystalEnterprise.getSessionMgr().logon(username, password, cmsname, authtype);
ReportEngines engines = (ReportEngines) oEnterpriseSession.getService("ReportEngines");
ReportEngine widocRepEngine = (ReportEngine) engines.getService(ReportEngines.ReportEngineType.WI_REPORT_ENGINE);
IInfoStore oInfoStore = (IInfoStore)oEnterpriseSession.getService("","InfoStore");
String query = "select si_id from ci_infoobjects where si_kind='webi' and si_instance = 0 and SI_ID= ";

IInfoObjects oInfoObjects = oInfoStore.query(query);

out.println("<tr><th>Report Name</th><th>Report Objects</th></tr>");

for(int i=0;i<oInfoObjects.size();i++)
{
IInfoObject oInfoObject = (IInfoObject) oInfoObjects.get(i);
 
   out.println("<tr><td>"+ oInfoObject.getTitle() + "</td>");
   DocumentInstance wiDoc = widocRepEngine.openDocument(oInfoObject.getID());

ReportDictionary reportDictionary=wiDoc.getDictionary();
   for(int a=0;a<reportDictionary.getChildCount() ;a++)
   {
String name=reportDictionary.getChildAt(a).getName();
out.println("<td>"+name+"</td></tr>");
out.println("<tr><td>  </td>");
   }
}
widocRepEngine.close();
engines.close();
}
catch(Exception e)
{
out.println(e);
}
finally
{
oEnterpriseSession.logoff();
}
%>

Former Member
0 Kudos

Thanks a lot for your help on the query prithvi.

with above query we are getting information as report wise is there any way where we can get folder wise

for ex:if we provide the folder id where we can get the list of reports and objects used in reports.

i was replacing the above query with below query however it's throughing error

select SI_PARENTID from ci_infoobjects where si_kind='webi' and si_instance = 0 and SI_PARENTID=""

need to your inputs on the same.

Regards,

Shiva Gunturu

Former Member
0 Kudos

Query should be

select si_id from ci_infoobjects where si_kind='webi'  and si_instance=0 and si_parentid=id_of_the_folder

Thanks,

Prithvi

Former Member
0 Kudos

with help of above query do we get list of reports present in sub folder to..?

Former Member
0 Kudos

No you wont,

You would get the reports which are present in the folder whose id is provided in the query.

For getting details from sub folders as well, you would need to modify your code and add recursive function to get the details.

Thanks,

Prithvi

Former Member
0 Kudos

You can refer to the below document.

http://scn.sap.com/docs/DOC-66797

The published the code gets the details of webi report data objects inside a folder. If you have a subfolder, it would get the details from that as well.

Thanks,

Prithvi

Former Member
0 Kudos

thanks for the query Prithvi with above query we are able to get report id,report name,list of objects however is there any way can we get from which class the object we are getting in report and objects used in quey would be much help full.

Thanks,

Shiva

Former Member
0 Kudos

Refer to the below blog

Answers (0)