I work for SAP Business Objects, in Technical Customer Assurance. My speciality is the Software Development Kits (SDKs) that we provide with our Business Intelligence products – BusinessObjects Enterprise, Web Intelligence, Desktop Intelligence, Crystal Reports and Crystal Xcelsius.
In my blog, I discuss subjects that I personally find interesting – little known or not-well-documented corners of the SDK, new functionality or new SDKs, or interesting issues that I’ve come across in a SAP Incident or SAP Developer Network forums.
You’re more than welcome to suggest any topic (SAP Business Objects SDK related, of course…) that you’d like me to discuss – I have a dozen or so items on my blog to-do list, but I’m always on the hunt for anything interesting with our SDKs.
If you’re developing a Java application that integrates with BusinessObjects Enterprise, BusinessObjects Edge, or Crystal Reports Server, and are publishing Crystal Reports to the system, then this post may be of interest to you.
BusinessObjects Enterprise XI 3.1 (XI 3 Service Pack 1) is to release this month. One of the good news for .NET developers is the inclusion of the Enterprise .NET SDK components for the XI 3 product line.
For Java developers, on the other hand, one truly good news with XI 3.1 is that ReportAdd is no longer needed!
Let me explain…
ReportAdd and Publishing Crystal Reports
To publish a Crystal Report rpt file to be managed by BusinessObjects Enterprise, you create a new IReport InfoObject, upload the rpt file to the IReport.getFiles() file collection property, invoke the IReport.refreshProperties() method and commit the IReport object to the InfoStore.
Before SP1, the IReport.refreshProperties() invokes a process to execute a binary – ReportAdd.exe on Windows and ReportAddSh.sh on Unix. This binary starts a Crystal Reports engine that parses the rpt file for Title, Parameter Fields, Database Logon, Selection Formulas, and Repository Object References. The info is passed back to the Java process that fills the IReport InfoObject property values.
This need for executing a binary caused issues when deploying a Enterprise Java application:
- The app is no longer 100% Pure Java
- The Enterprise client components (binaries) must be installed on the machine
- The app requires rights to access and execute a binary on the system – the Java process may have to run using the OS credentials used to install the Enterprise client components.
These issues are most problematic when deploying to Unix servers and to servers for which there are no versions of ReportAdd for the OS.
Refreshing Using the Report Application Server
The XI 3.1 version of IReport.refreshProperties() works differently. Instead of executing a binary, it makes a service call to the Report Application Server – the Crystal Reports Viewing and Modification Service – that opens and parses the rpt file on the Enterprise server.
You’d no longer need to deploy the binary components, but can simply deploy your Enterprise Java Web Application to your Java Web Application Server as a 100% Pure Java.
You’d need to ensure that the Report Application Server is running on your Enterprise deployment, but you’d likely have it running, since it’s used for other tasks – Publication dynamic recipient lists and Dynamic Cascading Prompts, to name two examples.
The Report Application Server invokes ReportAdd, but it does it on the Enterprise server, and not in the Java process on the application server.
Refreshing the Name for a New Crystal Report
There’s a slight difference in the new behavior that may affect you. Previously, when publishing a new Crystal Report, the name of the new Crystal Report would be set to the Title of the rpt file (in Crystal Reports Designer, see File -> Summary Info…) if you do not explicitly specify IReport.setTitle(…). The new behavior sets the name to be the rpt file name.
The Report Application Server report refresh always respects the Report Refresh Options as set in the IReport.getReportRefreshOptions() property, and the default is not to refresh the Title. To automatically update a new IReport with the report Title, set the option to refresh the Title:
// report here is the new IReport instance
then remove the Title refresh options afterwords:
I recommend removing the Title refresh option – otherwise, any subsequent report refresh many inadvertantly change the name of the report as it appears in InfoView or the CMC.
The new XI 3.1 Enterprise Java SDK IReport.refreshProperties() – that uses the Report Application Server – greatly simplifies deployment of Enterprise Java applications.
 The .NET SDK still uses ReportAdd, but this usually doesn’t cause deployment issues, since the .NET SDK is part of the Client Component installation. You can still get the old behavior – invoking ReportAdd – in Java by setting the Java System property ‘bobj.reportadd.nativereportadd’ to true, but this isn’t something that I’d recommend.