I have a well working program, which uses JasperReports. It uses JRBeanCollectionDataSource(List items); to populate the rows with data, but if I compile the .jrxml file either with JasperCompileManager.compileToFile() or with iReports I see only parameters populated without rows. Does anyone have had such a problem. I don't recieive any errors or exeptions.
+1
A:
When you compile the report using IReport or JasperCompileManager.compileToFile(), you say that you don't see rows.
You don't give enough details about :
- The version of IReport(ie. of JasperReports in IReport) vs the version of JasperReports that you use in production. Old versions of JasperReports use a DTD whereas the new version uses an XML schema.
- Are you passing a bean collection in IReport so that it can populate rows?
Usually people compile JasperReports at build time, in production, you always refer to the compile version.
The only reason you would compile a report at runtime is if you're trying to generate a report yourself from a form, dynamically. If that's the case, double-check the syntax of the file that you're generating.
John Doe
2009-07-28 11:44:38
+1
A:
I found the problem. My jasperreports.jar and the program's jasperreports.jar were different versions. So when I compile the reports with my jar and run it with the older, even without making changes of the jrxml, the rows didn't appear.
Thank you very much for your answer.
niki4ko
2009-08-03 08:22:27
You should accept your own answer so it is clear that the question is resolved. That will increase your standing in the community, because it will not be so annoying for people who come and want to answer the question.
sventech
2009-09-29 20:36:33