Question

Is there any way I can put jrxml files onto the Jasper server, link it to a datasource and let it compile without iReports, Java-Bridge, local Jaspersoft UI, ... I want to use as little Java as possible and I don't know about Apache ANT.

Can I do it through the (PHP) REST/SOAP API?

Or can I setup a little shell script on the Jasperserver that I can use like this way:

./compileMyReport.sh --report=/home/bla/test.jrxml --datasource=MongoDB_test_1
Était-ce utile?

La solution

What do you mean by "Jasper server"? Do you mean the "JasperReports Server - Web Application" (http://community.jaspersoft.com/project/jasperreports-server)? If so, it does offer a REST interface. Have a look at the "JasperReports Server Web Service Guide" (http://community.jaspersoft.com/documentation?version=7114).

If you, however, only want to have reports somewhere and execute them programmatically that can also be arranged (and would be much easier than to go via the JasperServer Rest Interface). For this you would only need to set up a minimal java class. You could then simply call this "script" via a e.g. a system call and let it generate the report to disk. I've recently blogged about a security issue with jasperreports and there I'll also give the necessary code to execute jaspers: http://blog.datenwerke.net/2013/05/jasperreports-in-box-part-i.html

Hope that helps.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top