Hi all,
* I am working on jasper reports,I have successfully generated sample pdf report from a java program.
* But i am getting problems when i tend to call that report genarating method from a commandButton of a jsp page.
The java code executed successfully:
*******************************************
getpdf()
{
jasperReport = JasperCompileManager.compileReport( "c:\\Report.jrxml");
jasperPrint = JasperFillManager.fillReport(
jasperReport, new HashMap(), new JREmptyDataSource());
JasperExportManager.exportReportToPdfFile(
jasperPrint, "c:\\sample.pdf");
}
The Report.jrxml file:
************************
<?xml version="1.0"?>
<!DOCTYPE jasperReport
PUBLIC "-//JasperReports//DTD Report Design//EN"
"http://jasperreports.sourceforge.net/dtds/jasperreport.dtd">
<jasperReport name="Simple_Report">
<detail>
<band height="20">
<staticText>
<reportElement x="180" y="0" width="200" height="20"/>
<text><![CDATA[Hello World!]]></text>
</staticText>
</band>
</detail>
</jasperReport>
jsp page code for calling that getpdf() method:
************************************************** **
<h:commandButton styleClass="buttonimg"
image="../../" value=" " action="#{OrderList.getPdf}" />
Exception I got:
******************
package net.sf.jasperreports.engine does not exist
import net.sf.jasperreports.engine.*;
For ur kind attention:
************************
* I can able to generate pdf report successfully when i execute getpdf() as a stand alone java program.
* But i am getting exception, only wen i tend to call that getpdf() method from a jsp as mentioned above.The report was not compiled due to unavailable packages.
Did anyone face this problem,kindly get me a solution for this problem,I am almost stuck wit this crisis,dono know how to proceed further???
Awaiting ur ideas on it.
Thanks In Advance,
Sundar.