jasper reports - How to properly stretch with overflow for non-detail band -
i have fields in title , page header have multiple lines. want them stretch vertically problem field below stretched field missing. grouped them using frame.
the properties set:
position type : float stretch type : relative tallest object stretch overflow : true
please see below screen shot.
you can try these properties of text : -
for first field (cashier name) of title band use properties :-
position type- fix relative top stretch type- relative band height stretch overflow - true
for second field (date) set these properties
position type- fix relative bottom stretch type- no stretch stretch overflow- false
in report can see properties if run report sample hsql database in ireport :-
<?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="ward utilization" pagewidth="300" pageheight="300" orientation="landscape" columnwidth="280" leftmargin="10" rightmargin="10" topmargin="10" bottommargin="10" uuid="85476864-df43-454c-83dd-9c1b475ec223"> <property name="ireport.zoom" value="1.0"/> <property name="ireport.x" value="0"/> <property name="ireport.y" value="0"/> <querystring> <![cdata[select * orders]]> </querystring> <field name="orderid" class="java.lang.integer"/> <field name="customerid" class="java.lang.string"/> <field name="employeeid" class="java.lang.integer"/> <field name="orderdate" class="java.sql.timestamp"/> <field name="requireddate" class="java.sql.timestamp"/> <field name="shippeddate" class="java.sql.timestamp"/> <field name="shipvia" class="java.lang.integer"/> <field name="freight" class="java.math.bigdecimal"/> <field name="shipname" class="java.lang.string"/> <field name="shipaddress" class="java.lang.string"/> <field name="shipcity" class="java.lang.string"/> <field name="shipregion" class="java.lang.string"/> <field name="shippostalcode" class="java.lang.string"/> <field name="shipcountry" class="java.lang.string"/> <group name="bed"/> <title> <band height="42"> <textfield isstretchwithoverflow="true"> <reportelement uuid="c438eefe-5415-409e-8e7c-c763a7305ae2" stretchtype="relativetobandheight" x="87" y="0" width="24" height="20"/> <textelement/> <textfieldexpression><![cdata[$f{shipname}]]></textfieldexpression> </textfield> <textfield> <reportelement uuid="83c8a0d7-af5f-43ec-88dd-7d923a5b2a28" positiontype="fixrelativetobottom" x="87" y="21" width="24" height="20"/> <textelement/> <textfieldexpression><![cdata[$f{shipcity}]]></textfieldexpression> </textfield> </band> </title>
Comments
Post a Comment