Skip to Content
Author's profile photo Prithviraj Shekhawat

Java Enterprise BE12 Get Webi Report Objects

This document provides a way to get the data objects used in a web intelligence document using Report Engine Java SDK.

While running the code, you have to provide a folder id, for which you want all the webi report data objects. This will also bring reports in sub folders.

For more scripts and information on how to run these scripts refer to the blog avaiable here:

Below is the Java Server Pages (JSP) sample


•You would need to change the userName, password, cmsName  to the values specific to your enterprise server in the provided sample code.

• The sample code will only run with BO XI 3.1 version of SAP BusinessObjects Platform

Get Webi Document Objects



.table {

  margin-bottom: 15px;

  border-collapse: collapse;


  .table_header td {

  background: #294f7f;

  padding: 5px 10px;

  color: rgb(255,255,255);

  border-top: 1px solid #CBD6DE;

  border-bottom: 1px solid #ADBECB;

  font-size: 1.0em;

  font-weight: bold;


  .table_header td {

  border: 1px solid #CBD6DE;


  .row td{

  padding: 5px 10px;

  color: #666666;

  border: 1px solid #CBD6DE;


  .row td {

  background: #ffffff;





<%@ page import=”com.crystaldecisions.sdk.framework.*,




<TABLE id=”htmlTable” BORDER=”1″ cellpadding=”0″ cellspacing=”0″   width=”90%”  class=”table” align=”center”>

<tr class=”table_header”>

   <td>Report ID</td><td>Report Name</td><td>Report Objects</td>




  //Enter Username

  String username = “administrator”;

  //Enter User password

  String password = “”;

  //Enter CMS Name

  String cmsname = “localhost:6400”;

  String authtype = “secEnterprise”;

  //Enter the folder if for which you need to retrieve the webi reports objects

  int report_folder_id=2750278;

  IEnterpriseSession oEnterpriseSession=null;

  ReportEngines engines=null;

  ReportEngine widocRepEngine=null;



  oEnterpriseSession = CrystalEnterprise.getSessionMgr().logon(username, password, cmsname, authtype);

  engines = (ReportEngines) oEnterpriseSession.getService(“ReportEngines”);

  widocRepEngine = (ReportEngine) engines.getService(ReportEngines.ReportEngineType.WI_REPORT_ENGINE);



  catch(Exception e)















private void getReportObjects(IEnterpriseSession oEnterpriseSession,ReportEngine widocRepEngine,int reportID, JspWriter out) throws Exception


DocumentInstance wiDoc = widocRepEngine.openDocument(reportID);

  ReportDictionary reportDictionary=wiDoc.getDictionary();

  for(int a=0;a<reportDictionary.getChildCount() ;a++)


  String name=reportDictionary.getChildAt(a).getName();


  out.println(“<tr class=\”row\”><td>  </td><td>  </td>”);





private void getReportObjectsInFolder(IEnterpriseSession oEnterpriseSession,ReportEngine widocRepEngine,int reportFolderID, JspWriter out) throws Exception


IInfoStore oInfoStore = (IInfoStore)oEnterpriseSession.getService(“”,”InfoStore”);



  String query = “select si_id from ci_infoobjects where SI_PARENTID=”+reportFolderID;

  IInfoObjects oInfoObjects = oInfoStore.query(query);

  for(int i=0;i<oInfoObjects.size();i++)


  IInfoObject oInfoObject = (IInfoObject) oInfoObjects.get(i);

  String objectKind1=oInfoObject.getKind();



  int folderID=oInfoObject.getID();

  IInfoObjects boReportInfoObjects=oInfoStore.query(“SELECT SI_ID FROM CI_INFOOBJECTS WHERE SI_PARENTID=”+folderID);

  for(int j=0;j<boReportInfoObjects.size();j++)


  IInfoObject boReportInfoObject=(IInfoObject)boReportInfoObjects.get(j);

  String objectKind=boReportInfoObject.getKind();





  else if(objectKind.equals(“Webi”))


  out.println(“<tr class=\”row\”><td>”+ boReportInfoObject.getID() + “</td><td>”+ boReportInfoObject.getTitle() + “</td>”);





  else if(objectKind1.equals(“Webi”))


  out.println(“<tr class=\”row\”><td>”+ oInfoObject.getID() + “</td><td>”+ oInfoObject.getTitle() + “</td>”);





catch(Exception exe)






Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Hi Prithviraj,

      Can you please help me in creating a similar script for BI 4.1? I need it really badly. If you could just guide me what needs to be changed here to make it work with BI 4.1, it would be great.



      Author's profile photo Dell Stinnett-Christy
      Dell Stinnett-Christy

      None of this coed will work with 4.1 - the ReportEngine SDK has been deprecated.  Instead, you need to look at the new RESTful Web Services SDK to get this information.  The beauty of the RESTful Web Services SDK is that you don't have to install anything from SAP to use it - you just have to have an HTTP components library (I use the one from Apache).  RWS communicates through HTTP Get and Post calls and returns data in either XML or JSON format. 

      For more info about RWS, you can get the Help files from  Select the version of BO that you have on the left and then go to the Development Information section.  There is also and SCN space for it at RESTful Web Services SDK.


      Author's profile photo Prithviraj Shekhawat
      Prithviraj Shekhawat
      Blog Post Author

      Rightly mentioned by Dell. You would need to go with REST web services.