Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am working with tJasperReportExec downloaded from exchange site to do some reporting.
My job works just fine when there is some data in the datasource (postgres DB), but when the there is no data (the query return no rows) I get this exception below (even if when I execute the report .jrxml from the TIBCO jaspersoft studio I don't get any error and the report is generated and the subreport in question is just empty)
Any Idea why ?
The job was compiled in version 6.2.1 (as required in tJasperReportExec)
16:46:33,587|DEBUG|Fill 3: no data
16:46:33,588|DEBUG|Fill 3: closing query executer
16:46:33,588|DEBUG|Fill 3: notifying of completion
16:46:33,588|DEBUG|Fill 3: notified of fill result
16:46:33,589|ERROR|Fill 1: exception
java.lang.NullPointerException
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:135)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:558)
at net.sf.jasperreports.engine.fill.BaseReportFiller.fill(BaseReportFiller.java:396)
at net.sf.jasperreports.engine.fill.JRFillSubreport.fillSubreport(JRFillSubreport.java:742)
at net.sf.jasperreports.engine.fill.JRSubreportRunnable.run(JRSubreportRunnable.java:58)
at net.sf.jasperreports.engine.fill.AbstractThreadSubreportRunner.run(AbstractThreadSubreportRunner.java:216)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Hi when i am trying to run the jasper report i am getting nullpointer exception in JasperPrint line. For you reference below mentioned my code. Can you please give me any idea?
@Override
public int pvVerificationReportNew(String outputFile, Map<String, Object> parametersMap) {
Connection jdbcConnection = null;
int result = -1;
try {
jdbcConnection = financeDao.getJdbcTemplate().getDataSource().getConnection();
String jasperFileName = jasperDir + File.separator + "PVverification.jasper";
JasperPrint jprint = JasperFillManager.fillReport(jasperFileName, parametersMap, jdbcConnection);
JasperExportManager.exportReportToPdfFile(jprint,
outputFile);
result = 0;
}
catch(Exception e) {
logger.error(e.getMessage(), e);
}
finally{
PilUtil.close(jdbcConnection);
}
return result;
}
Hard to say without the stack trace. Could you please post your code as code formatted text here and add please the stack trace.
Hi buddy,
I am using jasper main report with sub report. It is working when we are click preview button in eclipse.
But while running dynamically we are getting below error.
Resource not found at: report/subreport.jasper.
can you please give me a proper solution.
Thanks,
selva.