Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member

This document provides a way to retrieve the details of Web intelligence report to get information of Report name , Report Id and the associated Universe name and Path for the Webi report in BO server using Business Intelligence platform Java SDK. The sample code lists all the poperties associated with a Webi and display the output in a browser window.

Sample Code

<%@ page import= "com.businessobjects.rebean.wi.*" %>

<%@ page import="com.crystaldecisions.sdk.properties.*"%>

<%@ page import="com.crystaldecisions.sdk.framework.*"%>

<%@ page import="com.crystaldecisions.sdk.occa.infostore.*" %>

<%@ page import="com.crystaldecisions.sdk.plugin.desktop.folder.*" %>

<%@ page import="java.util.*" %>

<html>

  <head></head>

<body>

<table border="2" cellpadding="0"
style="border-collapse: collapse" bordercolor="#111111"
width="100%" id="AutoNumber1">

  <tr>

<th width="30%">Report Name</th>          

<th width="10%">Report Id</th>

<th width="20%">Universe Name</th>

<th width="40%">Folder Path </th>

</tr>

  <%

  try

  {

String CMS = "CMS Name";                                        

String UserID = "Username";                                     

  String Password = "Password";

String authType = "secEnterprise";

ISessionMgr sm = CrystalEnterprise.getSessionMgr();

IEnterpriseSession es = sm.logon(UserID, Password, CMS,"secEnterprise");

IInfoStore iStore = (IInfoStore)es.getService("","InfoStore");

ReportEngines repEngines = (ReportEngines)es.getService("ReportEngines");

ReportEngine repEngine =(ReportEngine)repEngines.getService(ReportEngines.ReportEngineType.WI_REPORT_ENGINE);

String sq = "select * from ci_infoobjects where si_kind='webi' and si_instance = 0";

IInfoObjects iObjects = iStore.query(sq);

IInfoObject iObject = null;

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

  {

iObject  (IInfoObject)iObjects.get(i);

  out.print("<tr><td>"  iObject.getTitle() + "</td><td>" + iObject.getID() +"</td>");

  DocumentInstance iDoc = repEngine.openDocument(iObject.getID());

  DataProviders iProviders = wiDoc.getDataProviders();

  out.println("<td>"  wiProviders.getItem(0).getDataSource().getLongName() + </td>");

  wiDoc.closeDocument();

  IProperties rop = iObject.properties();

  IProperty etProp = prop.getProperty("SI_PARENTID");

  String olderID = getProp.toString();

  IInfoObjects older = iStore .query("select * from ci_infoobjects where i_id="+FolderID);

  IInfoObject folder=(IInfoObject)folder.get(0);   

if(ifolder.getKind().equals("Folder"))

     {

IFolder ifolder=(IFolder)ifolder;

  String inalFolderPath=""; 

  if(iifolder.getPath()!= ull)

  {

  String ath[]=iifolder.getPath();

   for(int i=0;fi<path.length;fi++)

   {

   finalFolderPath  path[fi] + "/" + finalFolderPath;

   }

   finalFolderPath  finalFolderPath + iifolder.getTitle();

  }

  else

{

  finalFolderPath=finalFolderPath+iifolder.getTitle();

  }

  out.println("<td>"  finalFolderPath + "</td></tr>");

  }

  }

  es.logoff();

}

catch(Exception e)

  {

          out.println(e);

  }                                 

                %>

1 Comment
Labels in this area