This document provides a way set a publications report bursting method using the BusinessObjects Enterprise Platform Java SDKs.

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

http://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 and the publication SI_ID in the query to the values specific to your enterprise server in the provided sample code.

• The sample code is tested with BI 4.0 version of SAP BusinessObjects Platform.

Set Publication Report Bursting Method

<%@ 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”
%>
<%

try {

String userName = “administrator”; //administrator username
String password = “Password1”;  //administrator password
String cmsName = “localhost:6400”; //cms name
String authType = “secEnterprise”;

IEnterpriseSession enterpriseSession = CrystalEnterprise.getSessionMgr().logon(userName, password, cmsName, authType);
IInfoStore infoStore = (IInfoStore)enterpriseSession.getService(“”, “InfoStore”);

String query = “select * from ci_infoobjects where si_id=11475”;

IInfoObjects oInfoObjects = (IInfoObjects)infoStore.query(query) ;

IInfoObject oInfoObject = (IInfoObject) oInfoObjects.get(0);
IPublication pub=(IPublication)oInfoObject;

out.println(“Publication Name :”+pub.getTitle()+”<br>”);
out.println(“Publication ID :”+pub.getID()+”<br>”);
out.println(“Report Bursting Mode Before :”+pub.getBurstingMode()+”<br>”);

//Use IPublicationBase.CeDataBurstingMode.ceSinglePass for setting single pass bursting (i.e) One database fetch is executed in a single report processing job
//Use IPublicationBase.CeDataBurstingMode.ceMultiplePass for setting Multiple pass bursting (i.e) One database fetch is executed for each batch of recipients
//Use IPublicationBase.CeDataBurstingMode.cePerRecipientBursting for setting Per recipient bursting (i.e) One database fetch is executed for each recipient

pub.setBurstingMode(IPublicationBase.CeDataBurstingMode.cePerRecipientBursting);
infoStore.commit(oInfoObjects);
out.println(“Report Bursting Mode After:”+pub.getBurstingMode()+”<br>”);
}
catch(SDKException sdkEx) {
out.println(sdkEx);
}

%>

To report this post you need to login first.

2 Comments

You must be Logged on to comment or reply to a post.

  1. Arun Kumar

    Hi,

    Thanks for the information. We have to publish the report based on a condition like a Flag in the report 1 or 0. Is that possible? Also we use Windows AD so will it be secWindowsAd?

    Arun

    (0) 
    1. Prithviraj Shekhawat Post author

      I not sure about setting a flag as I haven’t done something on similar lines. Regarding Windows AD login, you should use secWinAD as authentication and make sure you have below settings done for your application.

      -Djava.security.auth.login.config=c:/windows/bsclogin.conf (or non default path)

      -Djava.security.krb5.conf=c:/windows/krb5.ini (or non default path)

      (0) 

Leave a Reply