I am presenting a very trivial solution (although I also got it from goggling) , but it will definitely save a lot of valuable time. So friends presenting here
Configuring Crystal Report with Java
1. Software Requirements :
i. Crystal Report – Version 10.
ii. Tomcat – 4.1 or above
iii. JDK 1.4.1
Operating Systems
i. Windows 2000
ii. Windows XP Professional
iii. Windows 2003 Server
1. Hardware Requirements :
Computer/Processor 133 MHz or higher Pentium-compatible CPU
Memory At least 128 megabytes (MB) of RAM. 256 MB
recommended. 4 gigabytes (GB) maximum
Disk space 320 Megabytes
2. Installing Crystal Report :
i. Download form Internet:
ii. Unzip Crystal Reports v10.zip
iii. Run Setup.exe & Follow Instructions
3. Installing the Java Reporting Component
i. Run CR10_Autorun_ENENT.exe from the Crystal Reports product distribution
(same folder where Setup.exe is present).
ii. Click Add Java Components.
iii. Click Crystal Reports 10 Java Reporting Component, and follow the instructions
on the screen.
iv. Crystal Reports 10 Java Reporting Component is installed. The jar files for the
Java Reporting Component are found in C:\Program Files\Common Files\Crystal Decisions\2.5\java\lib.
4. Configuring First Application in Tomcat
(Assuming tomcat installation directory is C:\Program Files\Apache Group\Tomcat 4.1)
i. Create folders lib & classes in WEB-INF folder in ROOT folder of your Tomcat
Ex: C:\Program Files\Apache Group\Tomcat 4.1\webapps\ROOT\WEB-INF
ii. Copy all the jars from C:\Program Files\Common Files\Crystal Decisions\2.5\java\lib
and C:\Program Files\Common Files\Crystal Decisions\2.5\java\lib\external folders
to C:\Program Files\Apache Group\Tomcat 4.1\webapps\ROOT\WEB-INF\lib folder
iii. Copy C:\Program Files\Common Files\Crystal Decisions\2.5\java \ CrystalReportEngine-config.xml and C:\Program Files\Common Files\Crystal Decisions\2.5\java\log4j.properties files to C:\Program Files\Apache Group\Tomcat 4.1\webapps\ROOT\WEB-INF\classes folder.
iv. Copy C:\Program Files\Common Files\Crystal Decisions\2.5 \ crystalreportviewers10 folder to C:\Program Files\Apache Group\Tomcat 4.1\webapps\ROOT folder.
v. Copy a Report file (ex: Report1.rpt) in C:\Program Files\Apache Group\Tomcat 4.1\webapps\ROOT folder.
vi. Create a sample jsp (ex : CrystalReport.jsp) in C:\Program Files\Apache Group\Tomcat 4.1\webapps\ROOT folder.
Note : String report = "/Report1.rpt"; if the report file is inside a directory
ex: C:\Program Files\Apache Group\Tomcat 4.1\webapps\ROOT\Reports\ Report1.rpt
then String report = "/Reports/Report1.rpt";
6. Launching First Application From Tomcat :
Type http:// name>:/CrystalReport.jsp in browser.
7. Platform-Specific Issues
ii. On an AIX platform running IBM JDK 1.3.1 or 1.4, a bug in the JDK can cause reports to crash. As a workaround, set the environment JITC_COMPILEOPT to SKIP{com/crystaldecisions/reports/common/encryption/Processing}{processing}.
iii. When using Tomcat 4.1.24, embedded text objects are rendered as multiple instances of the first field in the embedded text objects. This does not occur in earlier or later versions.
iv. The BEA JRockit JVM has a parallel garbage collection option that causes out of memory exceptions when dealing with contiguous blocks of memory greater than 2 MB. As a workaround, increase the maximum heap size or switch to the generational copying garbage collector. To set the maximum heap size, use the "-XmxNNNm" option, where NNN is the size of the heap in MB. To use the generational copying garbage collector, use the "-Xgc:gencopy" option.
8. Other Issues
Formatting and Rendering
i. The currency symbol in a report floats even if the fixed position option is selected.
ii. The time and date format displayed in a report is based only on the default locale settings of the server.
iii. When viewing a report, if the report contains objects that cross a page boundary, the resulting page is displayed as two horizontal pages.
iv. When viewing a report in the viewer, text objects without spaces do not display if the width is too small. Increasing the width of the text object causes the report to be correctly displayed.
v. The character spacing feature is not supported in this release. Character spacing applied to a text object is ignored.
vi. Due to limitations in HTML 4.0, the Round border style for a box object is displayed as a rectangle instead.
vii. When viewing a report in the viewer, column headings of a cross-tab may overlap or truncate.
viii. When viewing a report with a cross-tab in the viewer, if the cross-tab has a total row at the top of the cross-tab, part of the fields in the cells are clipped. If the cross-tab has a total row at the bottom of the cross-tab, the cells are not clipped (it behaves as expected).
ix. When viewing a report in the viewer, extra lines in the text field can appear. This occurs due to rounding up the conversion from twips to pixels. As a workaround, resize the section slightly.
x. When exporting a report that has Arial Bold text formatting to PDF, you may get an error message when you open the PDF.
Relational Databases and SQL Statements
i. When refreshing a BIT stored procedure report from a SQL Server or Sybase database, parameter fields become pull down menus with no default values. You cannot view the report if the report relies on parameter values.
ii. The Oracle JDBC driver does not support reports with BFILE data.
iii. The Oracle JDBC driver does not support interval data types.
iv. The Oracle JDBC driver does not support reports with UROWID data.
v. The Sybase JDBC driver only allows up to 255 characters to be entered for fields of type char, varchar, and nvarchar. If you need to enter more than 255 characters in a field, use the text type instead.
vi. Earlier versions of the Sybase JDBC driver do not support reports with UNICHAR or UNIVARCHAR data. Use jConnect for JDBC version 5.5 ESD #9 or above.
vii. The Informix ODBC driver returns the CLOB field as an object rather than a CLOB.
viii. Reports with cyclic joins are not supported in this release. In addition, joins that require execution of independent queries, which are then later linked by some other set of tables, are not supported in this release.
ix. BLOB fields that are set to 'can grow' do not grow. For example, different sized images placed in BLOB fields with the 'can grow' property are rendered as the same size.
x. When refreshing a stored procedure report from a SQL Server database, timestamp parameters should be in hexadecimal format.
Charting
i. The chart legend can appear differently in the Crystal Reports Designer than in the viewer.
ii. When viewing a report with a cross-tab and a chart, the cross-tab will always appear over the chart regardless of the setting of the MoveToFront property for the cross-tab.
iii. The viewer does not display textures or pictures used as the background for charts.
iv. When viewing a report with a chart, the data label of the chart does not appear if it has a negative value.
v. When viewing a chart in the viewer, the points on the lines of the graph are not displayed. The line is still displayed.
vi. When viewing a chart that has an image split across multiple pages, the image can be incorrectly displayed. As a workaround, use the Keep Together flag on the image object to prevent splitting it across multiple pages.
Report Functionality
i. The Java Reporting Component uses a high resolution time and date format. Date and time functions can return a non-integer number of seconds.
ii. When using the ASC and CHR functions, a runtime error occurs if characters with a value outside 0-127 are used. The ASC and CHR functions have been deprecated, and so the ASCW and CHRW functions should be used in their place to avoid the runtime error with values outside 0-127. The ASC and CHR functions will not be supported in future versions.
iii. Only English locale datetime strings in the formula language are supported in this release.
Viewer UI
i. When viewing a report, the Export and Print buttons are not shown by default. To enable the buttons, set the isOwnPage property to true.
ii. When exporting a report, if the user presses the browser refresh button after the report has been exported, the user will be prompted to export the report again.
iii. Text search always begins on the second page. In addition, text search only highlights the first instance of the search string on each page. For instance, if two instances of the search string occur on the current page, the first instance will be highlighted but searching again goes to the next page.
IDE Integration
i. The log properties file points to $HOME/Crystal as a location to create log files. Since it does not exist, an error message is displayed. You should either create this directory, or modify the file to point to an existing directory.
ii. The viewer does not function if you manually delete CrystalReportEngine-config.xml from the classes folder. Creating new instances of the viewer using the wizard will not create a new copy of the XML file.
iii. When launching the Crystal Reports designer to view a report within the IDE, the designer fails to find the report if the report name contains characters that are not available in the locale of the operating system. For example, on a system with English as the system locale, a report with Japanese characters in its name fails to load. As a workaround, open the report using the "Open File" menu item within the running designer.
iv. The behavior of the Crystal Reports Viewer Wizard is different when inserting a viewer into a JSP page than when inserting into a servlet page. When inserting a viewer into a JSP page, the Wizard inserts a viewer tag and a report tag from the tag library into the source code. When inserting a viewer into a servlet, the Wizard inserts the showReport function, the getHTMLContent function, and the necessary include statements into the source code.
v. When using Japanese characters in JSP files, the characters may become corrupt because the JSP 1.2 specification requires that the default encoding to be set to ISO-8859-1. To use Japanese characters correctly, override the default encoding by adding the line, vmparam -Djsp.default.encoding.override=UTF-8, to the jbuilder.config file. If the file with Japanese characters was saved in UTF-8 format (using an application other than JBuilder), you do not need to edit the JBuilder.config file.
Documentation
i. When creating a Java Reporting Component report source, the path of the report can only be specified by using a relative URL. File path, UNC address, and relative file path are not supported.