As from the official documentation (JasperReports-Server-REST-API-Reference.pdf), it was found that a sample report (e.g. CutomersReport) published in jasper server can be invoked by the following restful api,
Question is: is there any way to locate the compiled .jasper file in the report server? (E.G. something like http://somehost:8080/jasperserver/CustomersReport.jasper ???)
No answers yet
Hi M Chisty, why do you need access to the .jasper file on the server? It should be an internal object stored in a temp area of the app server once a report is executed, and not accessible to JRS users.
You could download the JRXML file via REST and then compile it locally.
Thanks for your feedback.
As you mentioned "You could download the JRXML file via REST and then compile it locally. " ... . That's something I was actually looking for.
Now to answer your question: "why do you need access to the .jasper file on the server? ", I am providing a piece of code below which is currently working properly in our system. We are using iReport5.5 to design/compile reports. The reports (source/binary) are bundled with our EAR file (e.g. /mars-ejb/resources/META-INF/jasper-reports/reports/espl/esl_ej_final_assessment_notice.jrxml and /mars-ejb/resources/META-INF/jasper-reports/reports/espl/esl_ej_final_assessment_notice.jasper).
We have two types of reports:
We have decided to migrate to TIBCO JasperSoft solutions (with JasperStudio and Jasperreports Server, as because iReport is now deprecated). For this, Type (1) is not a problem. But I do not know how to achieve Type (2) i.e. how do I pass the populated ArrayList objects in .jasper file.
Our current code is like this:
When we want to generate a report (PDF byestream), we call our util class like this with passing the jasper file location, required parameters and ArrayList:
As you can see, if our report is deployed in the jasper server and our EAR/WAR file is deployed another server (JBoss/Tomcat etc), we cannot locate .jasper file path like this "/reports/parkingSpaceLevy/psl_modify_property.jasper".
In such a case, your suggestion about "download the JRXML file via REST and then compile it locally" might be one solution.
Question is: how/where can I locate the jrxml file? Is there any example?