douben7493 2018-09-17 13:27
浏览 43

PHPJasper - SubReports - 填写reportResource时找不到错误:

I have a main report and a subreport working fine in Jaspersoft. (data from mysql) I'm trying generating a pdf using PHPJasper (geekcom), but I have the following problem:

Error filling reportResource not found at: subreport.jasper

I assume it's just a problem at this line:

<subreportExpression><![CDATA["subreport.jasper"]]></subreportExpression>

Both reports are at same folder

How to set the path?

  • 写回答

1条回答 默认 最新

  • doudengshen5591 2019-03-18 19:29
    关注

    You could parametrize an absolute path to the subreport:

    1. In the main report, create a new parameter, e.g. subreportsPath, class java.lang.String

    2. In this parameter subreportsPath properties, search for "Default Value Expression" and write "."

    3. In the main report editor/design view, click the subreport, find its "Expression" property and change it to $P{subreportsPath} +"/mySubreport.jasper"

    Now, you can pass an absolute path to your subreportsPath parameter from your library code, e.g.

    array('subreportsPath' => 'C:/project/reports/reportX')
    
    评论

报告相同问题?

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度