This guild will show you how to set up and run your Crystal Reports in WebClient.
Download article files here
All the Plex objects that you will need are in the WebClient Components group model.
"_CrystalReportsXI.UI.ViewCrystalReportFull" is the function that you will want to used or inherit from. This function works by inputting the report name. The function will open the Crystal report object and show/hide the correct field types as needed on the panel. The report parameters can be passed in or entered on the panel directly. The "View PDF" button will output the PDF of the report. The "Export" button will open the report in the Crystal Report Web Viewer.
2) Copy the attached CRConfig.xml file to the same directory as your webclient.properties file.
Do not change the entry for <Xreportlocation> value. This is stubbed out and not used with Crystal Reports for WebClient.
To change the number of minutes that the session can be inactive before the report source and its resources are released, edit the <timeout> value.
A value of 0 indicates that there is no timeout.
If your application uses User-defined Function Libraries (UFLs), edit the <ExternalFunctionLibraryClassNames> value by adding the fully-qualified names of each external function library class to an embedded <classname> tag.
3) Add an entry to your obclient.properties file for Crystal.ReportPath. It should look something like this:
Add a DataSource entry to the obclient.properties for "
Environment.Default.CrystalDataSource=". The value of this entry can be the same as your entry for "
The value represents a folder in WebContent where you will place your report files.
If you would like to use a different folder from outside of your workspace to store the report files, you can change it in the Plex code with these steps:
- In the function that inherits from "CrystalReportsXI.UI.ViewCrystalReportFull", go to "Post Point Process options".
- Set the value of "CrystalReportsL<PublishedPath>" to whatever folder you want on your WebServer.
You will also need to set up a data source for Crystal reports in the obclient. This will be similar to the data source that you already entered for your webclient application, but the entry tag will be "
4) Right Click your Java Project in Eclipse. Select Properties. Select Java Build Path. In the Libraries Tab, add the "Crystal Reports Java Project Runtime Library". Sometimes Eclipse will give an error and not allow you to reference the Crystal Report Library. You can work around this by adding references to all the Crystal Reports Jars in your Project instead.
5) Copy the attached "Src" folder to the same location as your Plex-generated Source code.
6) Copy the items in the attached "Templates" folder into your Custom Templates/Src folder.
7) Copy the items in the attached "WebContent" folder to the WebContent folder of your Web Project.
8) Copy the items in the attached "WEB-INF/lib" folder to the WEB-INF/lib folder of your Web Project.
9) To enable logging for Crystal Reports, please add the following entries to your Webclient.properties file.
For Crystal Reports that include charting some logging messages such as the following might display in the Eclipse Console:
log4j:WARN No appenders could be found for logger (com.businessobjects.visualization.pfjgraphics.rendering.converter.GraphLoader).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
These are just warnings and will not affect the operation of WebClient or Crystal Reports.
To remove these messages you can:
1) Copy the log4j.xml file under the Java Web Project.java.resources.src and restart the web server
2) Add the class (com.businessobjects.visualization.pfjgraphics.rendering.converter.GraphLoader) to the logging section of WebClient.report