Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Export Crystal reports to PDF in java

Can anyone guide me on how to export crystal reports into PDF in java?

I am using Crystal Report Server XI.

Thanks in advance.

like image 571
ikvenu2000 Avatar asked Jul 05 '10 10:07

ikvenu2000


1 Answers

I've documented my spike test for the SAP Crystal Reports for Java runtime components – Java Reporting Component (JRC) here:

http://www.javathinking.com/2011/09/using-crystal-reports-java-api-to.html

I was using Business Objects 4.0, and probably the most important thing was to get the Java library – download ‘SAP Crystal Reports for Java runtime components – Java Reporting Component (JRC)’ from:

http://www.businessobjects.com/campaigns/forms/downloads/crystal/eclipse/datasave.asp

There are a lot of samples on the web to look at – you might find something to help here: http://wiki.sdn.sap.com/wiki/display/BOBJ/Java+Reporting+Component++SDK+Samples

A good example to start with is “JRC EXPORT REPORT”: http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/40d580ce-bd66-2b10-95b0-cc4d3f2dcaef

In my case I didn't need a server - I just used the JAR files, the RPT file, the database and my CRConfig.xml file:

<?xml version="1.0" encoding="utf-8"?>
<CrystalReportEngine-configuration>
    <reportlocation>..</reportlocation>
    <timeout>0</timeout>
    <ExternalFunctionLibraryClassNames>
        <classname></classname>
    </ExternalFunctionLibraryClassNames>
</CrystalReportEngine-configuration>
like image 51
prule Avatar answered Oct 12 '22 00:10

prule