on 08-24-2015 3:51 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
Restart the tomcat application server and execute, for example
http://<server>:<port>/Test/createdFile.jsp
Thanks,
Prithvi
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();
}
%>
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
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
User | Count |
---|---|
94 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.