jasper reports - How to draw a line for end of the page? -
i working on jasper reports. in reports, want have border style below data
______ ______ ______ ______ |__h1__|__h2__|__h3__|__h4__| | | | | | | | | | | | | | | | | | | | | |______|______|______|______| ----------page footer--------
i bottom border last line of every page. getting
______ ______ ______ ______ |__h1__|__h2__|__h3__|__h4__| | | | | | | | | | | | | | | | | | | | |
there needs gap footer cannot use line in page footer. if use line in page footer, last row of report not have bottom border.
is there way conditionally enable bottom border based on row being last row of page?
draw line columnfooter
band , set isfloatcolumnfooter="true"
isfloatcolumnfooter=true
, render column footer below last detail or group footer on particular column
example
<?xml version="1.0" encoding="utf-8"?> <jasperreport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="blank_a4_8" pagewidth="595" pageheight="842" columnwidth="555" leftmargin="20" rightmargin="20" topmargin="20" bottommargin="20" isfloatcolumnfooter="true" uuid="28bc671c-47fc-4083-8211-a3f952643349"> <property name="com.jaspersoft.studio.data.defaultdataadapter" value="5 empty records"/> <querystring> <![cdata[]]> </querystring> <columnheader> <band height="1"> <line> <reportelement x="0" y="0" width="300" height="1" uuid="226f98ce-bb08-4741-a5af-3073ce2aee3a"/> <graphicelement> <pen linewidth="0.5"/> </graphicelement> </line> </band> </columnheader> <detail> <band height="30" splittype="stretch"> <property name="com.jaspersoft.studio.unit.height" value="pixel"/> <textfield> <reportelement x="150" y="0" width="150" height="30" uuid="5279e4bc-05ce-46d7-b4cf-ef703d105d92"> <property name="com.jaspersoft.studio.unit.width" value="pixel"/> </reportelement> <box padding="5"> <toppen linewidth="0.0"/> <leftpen linewidth="0.5"/> <rightpen linewidth="0.5"/> </box> <textelement verticalalignment="middle"/> <textfieldexpression><![cdata["text field " + $v{report_count}]]></textfieldexpression> </textfield> <textfield> <reportelement x="0" y="0" width="150" height="30" uuid="96e9515f-fab2-483d-926b-6bc799199562"/> <box padding="5"> <toppen linewidth="0.0"/> <leftpen linewidth="0.5"/> <rightpen linewidth="0.5"/> </box> <textelement verticalalignment="middle"/> <textfieldexpression><![cdata[$v{report_count}]]></textfieldexpression> </textfield> </band> </detail> <columnfooter> <band height="1" splittype="stretch"> <property name="com.jaspersoft.studio.unit.height" value="pixel"/> <line> <reportelement x="0" y="0" width="300" height="1" uuid="226f98ce-bb08-4741-a5af-3073ce2aee3a"/> <graphicelement> <pen linewidth="0.5"/> </graphicelement> </line> </band> </columnfooter> </jasperreport>
output (running 5 record empty datasource)
note, when creating reports invoice's etc, fix lines on page (that not depend on datasource)
background
band can used.
Comments
Post a Comment