avoiding unwanted page break in JasperReports

While printing resultset using jasper api, I am facing one problem. **Description :** **Report format :** GroupA(GroupHeader) SubGroupName(SubGroup Header) ....Data(Detail Section)..... **Condition :** If my subgroup header or GroupHeader appears to be at the bottom of the page i want to insert a page break,so that both header sections as well as data appears on the next page. Example : **Actual Output :** GroupA(GroupHeader) SubGroupName(SubGroup Header) ....Data(Detail Section)..... **Expected Output :** I want to avoid unwanted Pagebreak.so that my output will look like , GroupA(GroupHeader) SubGroupName(SubGroup Header) ....Data(Detail Section)..... My JRXML file : <band height="51" splitType="Stretch"> <subreport> <reportElement stretchType="RelativeToBandHeight" x="1" y="0" width="801" height="51"/> <subreportParameter name="SUBREPORT_DIR"> <subreportParameterExpression><![CDATA[$P{SUBREPORT_DIR}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="P_Criteria_String"> <subreportParameterExpression><![CDATA[$P{P_Criteria_String}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="P_Criteria_Code"> <subreportParameterExpression><![CDATA[$P{P_Criteria_Code}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="P_UserName"> <subreportParameterExpression><![CDATA[$P{P_UserName}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="P_Company"> <subreportParameterExpression><![CDATA[$P{P_Company}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="P_ReportName"> <subreportParameterExpression><![CDATA[$V{ReportTitle}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="P_Criteria"> <subreportParameterExpression><![CDATA[$P{P_Criteria}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="P_Criteria_Suid"> <subreportParameterExpression><![CDATA[$P{P_Criteria_Suid}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="P_Criteria_Name"> <subreportParameterExpression><![CDATA[$P{P_Criteria_Name}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="REPORT_RESOURCE_BUNDLE"> <subreportParameterExpression><![CDATA[$P{REPORT_RESOURCE_BUNDLE}]]></subreportParameterExpression> </subreportParameter> <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression> <subreportExpression><![CDATA[$P{SUBREPORT_DIR} + "Header.jasper"]]></subreportExpression> </subreport> </band>
What API are you using: JasperReports or DynamicJasper?

以上就是avoiding unwanted page break in JasperReports的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏