7.6. SAP Crystal Reports

ReportServer comes with a basic support for SAP Crystal Reports SAP Crystal Reports is the only proprietary reporting component supported by ReportServer and thus, we are not allowed to ship the necessary libraries with the ReportServer release. If you do have a proper Crystal Reports license you are, however, good to go and in the following we describe the necessary steps to work with Crystal from ReportServer.

7.6.1. Prepare ReportServer for Crystal

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 in the SAP website. You may have to register here: https://www.sap.com/cmp/td/sap-crystal-reports-eclipse-trial.html and then click on the ''Runtime libraries'' link. Download the there located archive (around 67 MB). At the time of writing the version available is CR4ERL27_0-80004572. 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
  • commons-configuration-1.2.jar
  • commons-lang-2.1.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 some commons-*.jar and the 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.

Since ReportServer contains log4j libraries as of 4.3.0, you need the log4j adapter (log4j-1.2-api), available here: https://logging.apache.org/log4j/2.x/log4j-1.2-api/index.html. More information can be found here: https://logging.apache.org/log4j/log4j-2.14.1/manual/compatibility.html

Regarding this critical security issue: CVE-2021-44228. Crystal, on its current version CR4ERL27_0-80004572, is affected. For avoiding using the affected Crystal log4j libraries, use the log4j adapter (log4j-1.2-api) as described above. Please refer to this for more information: https://forum.reportserver.net/viewtopic.php?id=2926

Install Microsoft's TrueType core fonts on a Linux-Based ReportServer Installation

If your ReportServer is installed in a Linux environment, you have to install Microsoft's TrueType core fonts in order to run Crystal reports: http://corefonts.sourceforge.net/.

If your Linux distribution is based on Debian (this is the case with the Bitnami packages), you can run the following commands for installing the MS TrueType core fonts:

echo "deb http://deb.debian.org/debian buster contrib" >> /etc/apt/sources.list
apt-get update && apt-get install ttf-mscorefonts-installer
ln -s /usr/share/fonts/truetype/msttcorefonts /opt/bitnami/java/lib/fonts

The above should be run by a user with sudo/root permissions.

Note that the above applies for the Bitnami containers, VMs and cloud images. In case you use the Bitnami Linux Linux installer to install the application in your own server, the installation directory might be different (/opt/reportserverenterprise-VERSION by default). In this case, you'll need to create the symlink using a similar command as the following example:

ln -s /usr/share/fonts/truetype/msttcorefonts /opt/reportserverenterprise-4.0.0.6055-0/java/lib/fonts

Of course, if a different installation directory was set, you need to adapt the command to your specific installation.

Depending on your Linux distribution, you may also have to check the following directory:

/usr/lib/jvm/default-jvm/jre/lib/fonts

When you have successfully installed the ttf-mscorefonts package, you will be able to run Crystal reports on a Linux-based environment.

7.6.2. Use Crystal Reports

Reports for Crystal Reports come in the .rpt file format. All that is needed to configure a Crystal report in ReportServer is to upload the corresponding .rpt-file. Similarly to Birt, you can either configure a datasource via the interface or leave it open in which case Crystal will use the datasource configured within the report.

Example use:

Either use your Crystal Reports designer to patch up a small demo report or simply download a demo report here http://scn.sap.com/docs/DOC-6922 (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.