SAP Crystal Reports with ReportServer

In version 2.1 we added experimental support for SAP Crystal Reports which can now be used alongside Jasper and Birt for generating graphical reports with ReportServer. In this blog post we want to show you how to get started with Crystal.
SAP Crystal Reports is the first proprietary reporting component supported by ReportServer and thus, we are not allowed to ship the necessary jars with the open source ReportServer release. If you do have a proper Crystal Reports license you are, however, good to go.

In order to use Crystal Reports with ReportServer you must first install the SAP Crystal Reports for Java runtime components (short, the Java Reporting Component (JRC)). You’ll find these, for example, on the following SAP download site.  Here, look for Runtime Libraries and download the there located archive (around 45mb). Unzip the archive and locate the lib directory. This includes all the additional libraries you have to install to get going with Crystal Reports. The following jars are needed:

  • com.azalea.ufl.barcode.1.0.jar
  • CrystalCommon2.jar
  • CrystalReportsRuntime.jar
  • cvom.jar
  • DatabaseConnectors.jar
  • icu4j.jar
  • jai_imageio.jar
  • JDBInterface.jar
  • jrcerom.jar
  • keycodeDecoder.jar
  • logging.jar
  • pfjgraphics.jar
  • QueryBuilder.jar
  • webreporting-jsf.jar
  • webreporting.jar
  • XMLConnector.jar
  • xpp3.jar

That is, all jars except the commons-*.jar and log4j.jar. Note that these should not be included as ReportServer already ships with newer versions of these components. Copy the above mentioned jars to the ReportServer WEB-INF/lib directory and start ReportServer.

Next, we need a demo report. Reports for Crystal Reports come in the .rpt file format. Either use your Crystal Reports designer to patch up a small demo report or simply download a demo report (click on View Document for the download to start). If you downloaded the demo report, unzip the archive and you’ll find a report file called jrc_view_report.rpt.

Log into ReportServer and go to the report management area in the administration module. Create a new “Crystal Report” (right click on a folder) fill in some dummy properties and select the jrc_view_report.rpt file for upload.

Note that in the current version the datasource field is ignored by ReportServer. That is, the report is executed with the datasource that is configured within the .rpt file (similar to Birt reports, if the datasource field is left blank).

If you submit the data, you can now execute the report by double clicking the icon in the tree. Et voilà, your first Crystal Report with ReportServer.

You can now work with this report just as with any other report in ReportServer. That is, export it to various formats, schedule it, include it in TeamSpaces etc.

We are looking forward to hearing your thoughts on the integration of SAP Crystal Reports in ReportServer, especially in terms of what features you are missing.