Skip to Content
Author's profile photo Former Member

Deployment Of CRYSTAL REPORT or CRYSTAL RPEORT 2008 on Apache Tomcat / How to view Crystal Report on Web Browser

                                                                                                                                                                                                                                           

DEPLOYMENT OF CRYSTAL REPORTS ON APACHE TOMCAT

Task was to deploy the crystal reports on Apache tomcat, in order to view the reports on web browser.

We have perform following steps to do this,

Applications used are,

  • Java Eclipse for crystal reports 2008.
  • JDK 1.6.
  • Apache Tomcat.
  • Any web browser.
  • Mysql.
  • Mysql connector for java.
  • Adobe flash player 9 and above.
  • Crystal Report 2008.

NOTE: we can make crystal reports on java eclipse, since we are using dynamic parameters in the reports we use Crystal report 2008.

STEP: 1

  • Install all the above applications

STEP: 2

  • Create an Environment variable
  • Go to My computer properties and click Advance tab and then Environment variables button.

  • Click New in Environment Variables.

STEP 3:

  • Open java eclipse which you have installed

         

  • Click Next and then

       Give Project Name  -> Check the Default Location and-> Configuration as Crystal Report web Project

          

STEP 4:

  • You can create Crystal report using Java Eclipse for Crystal report, to create a sample report right the Folder which you created (Test_Cry)

        click New ->Others

  • Select Crystal Reports ->Blank report

      

  • Click the Layout Field and the Drag and Drop the fields from the table in the Field Explorer, Fields like City, Country and Region.

    

  • Now in order to view the Crystal report on Crystal report Viewer.
  • Right click the Report1.rpt you have made and click Crystal Reports-> Crystal Report Viewer JSP
  • Select Insert Crystal Reports Code Snippets

  • Then click ok
  • Report1-viewer.jsp will be created and click the report and run it

      

  • This was a simple report using Eclipse.

Task 2:

                         Create a report in crystal report 2008 with Mysql as Data source using JDBC

  • Copy the Mysql-connector-java.rar file and paste it inside LIB “C:\Program Files\Business Objects\common\4.0\java\lib”
  • Open CRconfig.XML file in “C:\Program Files\Business Objects\common\4.0\java” and add the MySQL-connector-java inside the class path “C:\Program Files\Business Objects\common\4.0\java/lib/mysql-connector-java-5.1.18-bin.jar”
  • And then inside JDBC give the Jdbcurl, class name and username and save the file.

    

  • Then drag that report to Test_cry inside web content

  

  • Day2-viewer.jsp will be created
  • open that and inside give your own database credentials and then save the report

      

  • Run the report on TOMCAT

        

  • Now to run the report on the browser
  • Copy the URL and run it on any browser
  • Click on the parameters and then give the parameters required
  • Click apply

    

  •    Now you can view your report created on Crystal report 2008 in the browser.


Assigned Tags

      4 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Abhimanyu Sharma
      Abhimanyu Sharma

      very nice document

      Author's profile photo Former Member
      Former Member

      good work

      Author's profile photo Former Member
      Former Member

      Hi,

      I tried to follow the same process but not able to vie the report in the browser.It throws org.apache.Jasperexception:Unable to compile the JSP  class.

      Please help.

      Thanbks  in advance.

      Debabrata

      Author's profile photo Abhilash Kumar
      Abhilash Kumar

      Hi Debabrata,

      Please post your question as a 'Discussion' in the SAP Crystal Reports, version for Eclipse space.

      -Abhilash