BusinessObjects, Web Intelligence , Crystal Reports

How to use Crystal Report ActiveX viewer in your Tomcat J2EE application

June 10th, 2009 by Kevin McManus Leave a reply »

If you ask the SAP developer support, they will say it’s not supported. However, there are complex Crystal Reports that renders properly in ActiveX viewer.

The only option right now is to use InfoView’s URL reporting. This is ok but there are a few places where this can get you into trouble. For example, let say your J2EE application is on the DMZ and your BOE server is inside of your corporate network. The firewall will only let certain ports (e.g. 6400) and no http requests. In case of URL reporting, you would have to call <BOE server>:<http port>/businessobjects/viewrpt.cwr from your J2EE applications. This will not work. In most cases, opening http port so that ActiveX viewer would work is not an option.

Here’s how to setup URL reporting as a part of you own application.

1)  copy crystalreportviewers folder from infoview /businessobjects/viewers folder and place it in the root of your J2EE application

2)  copy WEB-INF/lib/reportsourcebridge.jar from InfoView application and place it in WEB-INF/lib folder of your J2EE applicaiton

3)  Edit WEB-INF/web.xml to include

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

<servlet>
<servlet-name>viewrpt</servlet-name>
<description>
Reportsource bridge used to support Java applet viewer and ActiveX viewer.
</description>
<servlet-class>com.businessobjects.crystalreports.reportsourcebridge.ReportSourceBridge</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>

<servlet-mapping>
<servlet-name>viewrpt</servlet-name>
<url-pattern>/viewrpt.cwr</url-pattern>
</servlet-mapping>

4)  Restart Tomcat

5)  You should be able to access URL reporting from <your J2EE application>/viewrpt.cwr

Advertisement

Comments are closed.