We use jasperReports in our J2ee application running on WAS6 servers.
We build our reports in iReports.. test them in our RAD6 built application on a local WAS6 server on windows and then deploy them to our production Linux servers.
After much mucking about we decided that we really need a way of adding new reports without the hassle of redeployment - so I've developed a framework for storing reports and their definitions in our DB.
Everything works well - When the user requests a report (with the relevant paramters provided) .jasper and .jrxml files are pulled out of the database and stored temporarily in a temp directory on the server and jasper reports builds a PDF which is presented to the user... sweet...
Unfortunately, when the report in question contains a subreport things fall over. My code extracts .jasper and .jrxml files for all subreports used - and when running from my WAS6 server locally it works a charm. The SUBREPORT_DIR parameter is populated with a value specific to the environment it runs on - which matches the temp directory the .jasper and .jrxml files are extracted to ('C:\Temp\ReportFiles' on Windows boxes or '/temp/reportfiles/' on Linux ) but on my Linux servers the report fails with the following message:
(Does that make sense? )
Can anyone suggest a way to move forward?
posted 12 years ago
It seems my code that created files in a temp directory created them with uppercase names (for reasons that are not important to this discussion)...
Of course the reference to the subreport compiled by iReports was looking for a mixed case name ("MySubReport.jasper") -
so in windows it would find "MYSUBREPORT.JASPER" aand all would be ok - but the Linux boxes are a little more fussy about case-sensitivity in file names!
So in the end - nothing to do with Jasper at all!!
Stinging nettles are edible. But I really want to see you try to eat this tiny ad: