jasper ireport使用参数创建报告而不使用sql查询 [英] jasper ireport create a report with parameters without sql query
问题描述
我是jasper ireport的新手,我想知道是否可以使用静态文本和参数创建报告,但没有任何sql查询。
I'm new in jasper ireport , and I want to know if it is possible to create a report only with static text and parameters, but without any sql query.
当我设计我的报告时,它是可能的,但是当我尝试预览时,我收到此消息:文档没有页面。
When I design my report it is possible , but when I try to preview it , I get this message: "The document has no pages" .
我希望我的java程序传递参数并用静态文本显示它们
I want my java program to pass the parametrs and show them with the static text
感谢提前。
推荐答案
您收到该消息是因为报表的When No Data属性设置为No Pages。尝试将其设置为所有部分,无详细信息,除细节带外,所有波段都会出现。您可以在报告属性部分找到此属性,也可以直接在jrxml中添加:
You get that message because the "When No Data" property of your report is set to "No Pages". Try setting it to "All Sections, No Detail" and all bands will appear except the Detail band. You can find this property in the Report Properties section, or you can add it directly in the jrxml:
<jasperReport ... whenNoDataType="AllSectionsNoDetail" ... >
这篇关于jasper ireport使用参数创建报告而不使用sql查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!