This document provides a way get the File Repository location for crystal/webi reports using the BusinessObjects Enterprise Platform Java SDKs.

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

https://scn.sap.com/people/shawn.penner/blog/2013/06/04/scripts-and-samples

Below is the Java Server Pages (JSP) sample

Notes:

•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 is tested with BI 4.0 and 4.1 version of SAP BusinessObjects Platform.

Get Report FRS Path

<%@ page import = “com.crystaldecisions.sdk.occa.infostore.*,
com.crystaldecisions.sdk.framework.*,
com.crystaldecisions.sdk.exception.SDKException,
com.businessobjects.sdk.plugin.desktop.publication.*,
com.crystaldecisions.sdk.properties.*,
java.util.Set,
java.util.Iterator”
%>


<%

String userName = “administrator”; //adminstrator user account
String password = “password”;  //administrator password
String cmsName = “localhost:6400”; //CMS server name
String authType = “secEnterprise”;
String frsPathURL=null;
IEnterpriseSession enterpriseSession=null;
try {
enterpriseSession = CrystalEnterprise.getSessionMgr().logon(userName, password, cmsName, authType);
IInfoStore infoStore = (IInfoStore)enterpriseSession.getService(“”, “InfoStore”);
String query = “select si_id,si_name,si_kind,si_files from ci_infoobjects where si_kind in (‘crystalreport’,’webi’) and si_instance=0”;
IInfoObjects oInfoObjects = (IInfoObjects)infoStore.query(query) ;
for(int i=0;i {
IInfoObject oInfoObject = (IInfoObject) oInfoObjects.get(i);
IProperties props=oInfoObject.properties();

out.println(“

”);
out.println(“

”);
out.println(“

”);
if(props.getProperty(“SI_FILES”) !=null)
{
IFiles reportFiles=(IFiles)oInfoObject.getFiles();
frsPathURL=reportFiles.getFRSPathURL();
out.println(“

”);
}
else
{
out.println(“

”);
}
}

}
catch(SDKException sdkEx) {
out.println(sdkEx);
}
finally
{
if(enterpriseSession !=null)
{
enterpriseSession.logoff();
}
}

%>

Report ID Report Title Report Kind Report FRS Path
”+oInfoObject.getID()+” ”+oInfoObject.getTitle()+” ”+oInfoObject.getKind()+” ”+frsPathURL+”
SI_FILES Donot Exists

New NetWeaver Information at SAP.com

Very Helpfull

User Rating: Be the first one !