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 crystal reports on an enterprise system and opening them using RAS to perform some kind of modification. This code will work on a BOE XI 3.1 and a BI4 system.
Code Sample |
---|
<%@ page import = "com.crystaldecisions.sdk.exception.SDKException, IEnterpriseSession enterpriseSession = null; // Log onto Enterprise // The SI_ID to start at when searching // Obtain the necessary RAS factory for opening reports. for(;;) { // Loop through all objects // If there are no more objects then we're done. for(Iterator boCount = boInfoObjects.iterator() ; boCount.hasNext() ; ) { // Here is where you would do all the needed work / modifications %> |