7

I have created a frame and subreport for integration with APEX and refined to the point I am ready to deploy on JasperServer. Somehow the exact syntax is defeating me. I've tried all the variations the following questions would indicate, but nothing seems to work. I'm using Glassfish, btw, but I don't think that is significant. Here are my questions:

  1. When deploying the subreport, do I deploy as a report or as a JRXML file?

  2. Do I need to set up Input Controls for the subreport, as passed by the frame report?

  3. Does it matter where I deploy the subreport (folder structure) so long as I am passing the correct SUBREPORT_DIR parameter to the frame?

  4. On that SUBREPORT_DIR, I've tried a couple different things. First I had the default as an absolute path on my local box, for debugging purposes, and was passing the value I wanted in the URL (i.e. ...&SUBREPORT_DIR=/Subreports/...). I also tried setting the default to the path I wanted. Neither works, but should the former work as well as the latter?

  5. What's the actual syntax for passing SUBREPORT_DIR? I've deployed my frame report as "/reports/frame" and my subreport as "/reports/Subreports/sub", so I was passing "repo:/Subreports/" (without quotes in the URL, with quotes in the default on frame).

My frame and sub work in iReport with the same params I'm passing, but they don't work from the URL at all. I can load up the sub as a report under JasperServer, pass it the params frame passes, and get it to work, but when I try to run the frame, no dice.

Thanks in advance for all the help, and I hope to pay it back once I get this properly configured.

4

1 回答 1

1

OP的发现。

  1. 子报表需要作为 JRXML 文件部署在存储库中。它会在存储库视图的相应列中显示“文件”。

  2. 您不需要为子报表设置输入控件。框架报表只需要它使用的那些输入控件,而不需要子报表参数。

  3. 只要您传递了正确的 SUBREPORT_DIR,您就可以将子报表放在您想要的任何位置,但请记住,框架报表将完全按照您指定的名称引用子报表。我的两个问题之一(另一个请参见上面的#1)是在默认路径中指定扩展名。这在 iReport 中是正确的,但在服务器端是错误的。

  4. SUBREPORT_DIR可以作为参数传递并按照宣传的方式工作。

  5. 我现在将其用作默认参数的正确路径SUB_REPORT_DIR类似于"repo:/reports/Subreports/". 因此,详细的子报表表达式为:$P{SUBREPORT_DIR} + "five_col_sub".参见上面的#3。

不是那么棘手,真的,但也不完全直观。我的同事指出“repo:”是 JasperServer Repository 的缩写。现在似乎很明显,但我假设它的意思是“报告”,因此任何带有子报告的报告和子报告本身都必须存在于 /reports/ 目录下,但事实并非如此。

于 2016-01-03T01:20:03.980 回答