Base Scripting Template for Webi Reports
Tags:
When using SAP BusinessObjects Enterprise, there are times where it is useful to perform an action on all objects of a particular type. For example, if you want to delete all instances of a report, or you want to remap the universes for all webi reports. For these types of tasks, a script can be very useful and significantly faster than making the changes manually.
The code below can be used as a template for looping through all webi reports on an enterprise system and opening them to perform some kind of modification. This code will only work on a BOE XI 3.1 system.
Code Sample |
---|
<%@ page import = "com.crystaldecisions.sdk.exception.SDKException,
IEnterpriseSession enterpriseSession = null; // Log onto Enterprise // The SI_ID to start at when searching ReportEngines boReportEngines = (ReportEngines) boEnterpriseSession.getService("ReportEngines"); for(;;) { // Loop through all objects // If there are no more objects then we're done. ReportEngine boReportEngine = (ReportEngine) boReportEngines.getService(ReportEngines.ReportEngineType.WI_REPORT_ENGINE); for(Iterator boCount = boInfoObjects.iterator() ; boCount.hasNext() ; ) { DocumentInstance boDocumentInstance = boReportEngine.openDocument(boReport.getID()); // Here is where you would do all the needed work / modifications max_id = boObject.getID(); boReportEngine.close() %> |