开发者

Run a JasperServer report via PHP and pass over the querystring

I'm using Web Services to run some reports created in iReport on JasperReports Server. Inside the .jrxml file I can see the <querystring> xml that holds the SQL for the report. Is it possible to pass this querystring over to JasperServer via Web Services, instead of hard c开发者_如何转开发oding the definition inside the .jrxml file. This is the string I would build in PHP, then pass over to JasperReports Server to be used in the execution of the report.

<queryString>
   <![CDATA[SELECT * FROM table WHERE j=2]]>
</queryString>

Basically, I'm trying to find a way to dynamically create the SQL in PHP, then pass the SQL over to Jasper to run the report. Is it even possible?


Found out I could do this by setting up a parameter with $P!{query} instead of using $P{query}. The "!" makes the difference. Hope it helps someone else who comes along with the same problem.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜