Crystal Reports XI Official Guide

Although building Web applications in Java is meant to be independent of application servers, the J2EE standard tends to be interpreted differently for each vendor's application server. Because of this, each application server has a different way of performing Web application configuration. The general rule is that there is a folder structure like this:

\webApplicationFolder \WEB-INF web.xml \lib \classes

When setting up the Java Reporting Component for a given Web application, the following steps are required:

  • Copy all the Java Reporting Component .jar files from C:\Program Files\Common Files\Crystal Decisions\2.5\java\lib into the lib folder.

  • Copy all the third-party .jar files from C:\Program Files\Common Files\Crystal Decisions\2.5\java\lib\external into the lib folder.

  • Copy CrystalReportEngine-config.xml from C:\Program Files\Common Files\Crystal Decisions\2.5\java to the classes folder.

  • Copy the crystalreportviewer11 folder from C:\Program Files\Common Files\Crystal Decisions\2.5 to the Web application folder (webApplicationFolder in the previous example).

  • Add the following entry to the web.xml file:

    <context-param> <param-name>crystal_image_uri</param-name> <param-value>crystalreportviewers11</param-value> </context-param>

There are two additional steps required if you intend to use the Crystal tag libraries:

  • Copy crystal-tags-reportviewer.tld from C:\Program Files\Common Files\Crystal Decisions\2.5\java\lib\taglib to the WEB-INF folder.

  • Add the following entry to the web.xml file:

    <taglib> <taglib-uri> /crystal-tags-reportviewer.tld </taglib-uri> <taglib-location> /WEB-INF/crystal-tags-reportviewer.tld </taglib-location> </taglib>

Категории