Tuesday, May 17, 2011

How To generate Birt Report


BIRT Help File
After creating the service container edit the BCP classpath found in Cordys installation directory and
paste the below found jars into bcp.classpath.
E:\BirtSoftwaresFromYesBank\birt-runtime-2_6_0\ReportEngine\lib\chartengineapi.jar;E:\BirtSoftwaresFromYesBank\birt-runtime-2_6_0\ReportEng
ine\lib\chartexamplescoreapi.jar;E:\BirtSoftwaresFromYesBank\birt-runtime-2_6_0\ReportEngine\lib\chartitemapi.jar;E:\BirtSoftwaresFromYesBank\
birt-runtime-2_6_0\ReportEngine\lib\com.ibm.icu_4.2.1.v20100412.jar;E:\BirtSoftwaresFromYesBank\birt-runtime-2_6_0\ReportEngine\lib\commonscli-
1.0.jar;E:\BirtSoftwaresFromYesBank\birt-runtime-2_6_0\ReportEngine\lib\coreapi.jar;E:\BirtSoftwaresFromYesBank\birt-runtime-2_6_0\ReportE
ngine\lib\crosstabcoreapi.jar;E:\BirtSoftwaresFromYesBank\birt-runtime-2_6_0\ReportEngine\lib\dataadapterapi.jar;E:\BirtSoftwaresFromYesBank\bi
rt-runtime-2_6_0\ReportEngine\lib\dataaggregationapi.jar;E:\BirtSoftwaresFromYesBank\birt-runtime-2_6_0\ReportEngine\lib\dataextraction.jar;E:\
BirtSoftwaresFromYesBank\birt-runtime-2_6_0\ReportEngine\lib\dteapi.jar;E:\BirtSoftwaresFromYesBank\birt-runtime-2_6_0\ReportEngine\lib\emitt
erconfig.jar;E:\BirtSoftwaresFromYesBank\birt-runtime-2_6_0\ReportEngine\lib\engineapi.jar;E:\BirtSoftwaresFromYesBank\birt-runtime-2_6_0\Rep
ortEngine\lib\flute.jar;E:\BirtSoftwaresFromYesBank\birt-runtime-2_6_0\ReportEngine\lib\modelapi.jar;E:\BirtSoftwaresFromYesBank\birt-runtime-2
_6_0\ReportEngine\lib\modelodaapi.jar;E:\BirtSoftwaresFromYesBank\birt-runtime-2_6_0\ReportEngine\lib\odadesignapi.jar;E:\BirtSoftwaresFromY
esBank\birt-runtime-2_6_0\ReportEngine\lib\org.apache.commons.codec_1.3.0.v20100518-1140.jar;E:\BirtSoftwaresFromYesBank\birt-runtime-2_6_0\
ReportEngine\lib\org.eclipse.emf.common_2.6.0.v20100607-0756.jar;E:\BirtSoftwaresFromYesBank\birt-runtime-2_6_0\ReportEngine\lib\org.eclipse.e
mf.ecore.xmi_2.5.0.v20100521-1846.jar;E:\BirtSoftwaresFromYesBank\birt-runtime-2_6_0\ReportEngine\lib\org.eclipse.emf.ecore_2.6.0.v20100607-07
56.jar;E:\BirtSoftwaresFromYesBank\birt-runtime-2_6_0\ReportEngine\lib\org.w3c.css.sac_1.3.0.v200805290154.jar;E:\BirtSoftwaresFromYesBank\bi
rt-runtime-2_6_0\ReportEngine\lib\scriptapi.jar;E:\BirtSoftwaresFromYesBank\birt-runtime-2_6_0\ReportEngine\lib\js.jar;
Dont forget to edit the path of this jars to your actual path where you have copied the BIRT REPORT
ENGINE.
How to create BIRT Report Design ::
Step 1 : Get the required birt eclipse and create a new java Project
Step 2: Under the java project create a report say new report and select the template as blank
report.
Step 3 : Under outline of the project create a new data source.
Step 4: Specify the Driver details , url , username , password , no need of filling JNDI URL.
Step 5: Create Data set for the above Data source.
Step 6: Select table or write query for which the report is to be generated.
Step 7: For taking/ passing input parameter you need to create a parameter under report parameter,
specify the name and default value.
Step 8: Double Click the data set which you created and select Parameters , click new and specify
name and linked to report parameter .
Step9 : Click in preview and enjoy the report .

How to use this report using cordys ::
Go to system resource manager of cordys explorer and click web service explorer.
Type getreport and find click the webservice found and test it .
Specify parameters like ‘report design path’ in report name.
Format : html, pdf, xls etc.

1 comment:

Ashwini Verma said...

Great tip on using BIRT in cordys. Can you also submit a link to your article on BIRT Exchange devshare (http://www.birt-exchange.org/org/devshare/) so more BIRT developers can benefit from it?

Post a Comment