【发布时间】:2012-07-04 03:49:40
【问题描述】:
我正在使用 grails,并且我有这个 Jasper 报告,其中包含一个子报告。 有了这个简单的两个碧玉报告
注意:只有 .jrxml 是 /web-app/reports 内文件的文件扩展名
主报告[main_report][子报告区域]
<subreport>
<reportElement x="0" y="0" width="555" height="157"/>
<subreportExpression>
<![CDATA[$P{SUBREPORT_DIR} + "test_report.jasper"]]>
</subreportExpression>
</subreport>
测试报告[test_report][title.band]
<staticText>
<reportElement x="203" y="30" width="154" height="34"/>
<textElement/>
<text><![CDATA[Hello World]]></text>
</staticText>
查看视图或 gsp 文件我有这个命令
<g:jasperReport jasper="main_report"
format="pdf, html"
delimiter=" "/>
当我想查看 HTML 格式的 PDF 报告时,报告会返回一个空白页。我是否缺少使用子报告test_report 正确显示main_report 的内容。
【问题讨论】:
标签: grails jasper-reports ireport