jasper reports - How to stretch textFields at JasperReports 3.5.2? -
i using jaspereports 3.5.2.
i want stretch fields vertically, if text long want wrap it, , fields below want move down.
is possible? if jasper in version 3.5.2 support things this?
i read issue, , many people said that:
- every filed have use
isstretchwithoverflow="true" every reportelement have use
positiontype="float",stretchtype="relativetotallestobject"and last one: have group elements row
here code:
<?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="report" pagewidth="612" pageheight="842" columnwidth="552" leftmargin="30" rightmargin="30" topmargin="20" bottommargin="30"> <style name="normal" isdefault="true" fontname="lucida sans typewriter" isbold="false" isitalic="false" isunderline="false" isstrikethrough="false" pdffontname="helvetica" pdfencoding="cp1252" ispdfembedded="false"/> <pageheader> <band height="300" splittype="stretch"> <elementgroup> <textfield evaluationtime="report" isblankwhennull="true" isstretchwithoverflow="true"> <reportelement key="textfield" style="normal" mode="transparent" x="1" y="189" width="130" height="18" positiontype="float" stretchtype="relativetotallestobject"/> <textelement> <font isbold="true" size="7"/> </textelement> <textfieldexpression class="java.lang.string"><![cdata["value"]]></textfieldexpression> </textfield> <textfield isblankwhennull="true" isstretchwithoverflow="true"> <reportelement key="textfield" style="normal" mode="transparent" x="131" y="189" width="173" height="16" positiontype="float" stretchtype="relativetotallestobject"/> <textelement> <font size="7"/> </textelement> <textfieldexpression class="java.lang.string"><![cdata["aaa"]]></textfieldexpression> </textfield> <textfield evaluationtime="report" isblankwhennull="true" isstretchwithoverflow="true"> <reportelement key="textfield" style="normal" mode="transparent" x="300" y="189" width="130" height="18" positiontype="float" stretchtype="relativetotallestobject"/> <textelement> <font isbold="true" size="7"/> </textelement> <textfieldexpression class="java.lang.string"><![cdata["value"]]></textfieldexpression> </textfield> <textfield isblankwhennull="true" isstretchwithoverflow="true"> <reportelement key="textfield" style="normal" mode="transparent" x="430" y="189" width="173" height="16" positiontype="float" stretchtype="relativetotallestobject"/> <textelement> <font size="7"/> </textelement> <textfieldexpression class="java.lang.string"><![cdata["aaa"]]></textfieldexpression> </textfield> </elementgroup> <elementgroup> <textfield evaluationtime="report" isblankwhennull="true" isstretchwithoverflow="true"> <reportelement key="textfield" style="normal" mode="transparent" x="1" y="199" width="130" height="18" positiontype="float" stretchtype="relativetotallestobject"/> <textelement> <font isbold="true" size="7"/> </textelement> <textfieldexpression class="java.lang.string"><![cdata["value"]]></textfieldexpression> </textfield> <textfield isblankwhennull="true" isstretchwithoverflow="true"> <reportelement key="textfield" style="normal" mode="transparent" x="131" y="199" width="173" height="16" positiontype="float" stretchtype="relativetotallestobject"/> <textelement> <font size="7"/> </textelement> <textfieldexpression class="java.lang.string"><![cdata["aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"]]></textfieldexpression> </textfield> <textfield evaluationtime="report" isblankwhennull="true" isstretchwithoverflow="true"> <reportelement key="textfield" style="normal" mode="transparent" x="300" y="199" width="130" height="18" positiontype="float" stretchtype="relativetotallestobject"/> <textelement> <font isbold="true" size="7"/> </textelement> <textfieldexpression class="java.lang.string"><![cdata["value"]]></textfieldexpression> </textfield> <textfield isblankwhennull="true" isstretchwithoverflow="true"> <reportelement key="textfield" style="normal" mode="transparent" x="430" y="199" width="173" height="16" positiontype="float" stretchtype="relativetotallestobject"/> <textelement> <font size="7"/> </textelement> <textfieldexpression class="java.lang.string"><![cdata["aaa"]]></textfieldexpression> </textfield> </elementgroup> <elementgroup> <textfield evaluationtime="report" isblankwhennull="true" isstretchwithoverflow="true"> <reportelement key="textfield" style="normal" mode="transparent" x="1" y="209" width="130" height="18" positiontype="float" stretchtype="relativetotallestobject"/> <textelement> <font isbold="true" size="7"/> </textelement> <textfieldexpression class="java.lang.string"><![cdata["value"]]></textfieldexpression> </textfield> <textfield isblankwhennull="true" isstretchwithoverflow="true"> <reportelement key="textfield" style="normal" mode="transparent" x="131" y="209" width="173" height="16" positiontype="float" stretchtype="relativetotallestobject"/> <textelement> <font size="7"/> </textelement> <textfieldexpression class="java.lang.string"><![cdata["aaa"]]></textfieldexpression> </textfield> <textfield evaluationtime="report" isblankwhennull="true" isstretchwithoverflow="true"> <reportelement key="textfield" style="normal" mode="transparent" x="300" y="209" width="130" height="18" positiontype="float" stretchtype="relativetotallestobject"/> <textelement> <font isbold="true" size="7"/> </textelement> <textfieldexpression class="java.lang.string"><![cdata["value"]]></textfieldexpression> </textfield> <textfield isblankwhennull="true" isstretchwithoverflow="true"> <reportelement key="textfield" style="normal" mode="transparent" x="430" y="209" width="173" height="16" positiontype="float" stretchtype="relativetotallestobject"/> <textelement> <font size="7"/> </textelement> <textfieldexpression class="java.lang.string"><![cdata["aaa"]]></textfieldexpression> </textfield> </elementgroup> <elementgroup> <textfield evaluationtime="report" isblankwhennull="true" isstretchwithoverflow="true"> <reportelement key="textfield" style="normal" mode="transparent" x="1" y="219" width="130" height="18" positiontype="float" stretchtype="relativetotallestobject"/> <textelement> <font isbold="true" size="7"/> </textelement> <textfieldexpression class="java.lang.string"><![cdata["value"]]></textfieldexpression> </textfield> <textfield isblankwhennull="true" isstretchwithoverflow="true"> <reportelement key="textfield" style="normal" mode="transparent" x="131" y="219" width="173" height="16" positiontype="float" stretchtype="relativetotallestobject"/> <textelement> <font size="7"/> </textelement> <textfieldexpression class="java.lang.string"><![cdata["aaa"]]></textfieldexpression> </textfield> <textfield evaluationtime="report" isblankwhennull="true" isstretchwithoverflow="true"> <reportelement key="textfield" style="normal" mode="transparent" x="300" y="219" width="130" height="18" positiontype="float" stretchtype="relativetotallestobject"/> <textelement> <font isbold="true" size="7"/> </textelement> <textfieldexpression class="java.lang.string"><![cdata["value"]]></textfieldexpression> </textfield> <textfield isblankwhennull="true" isstretchwithoverflow="true"> <reportelement key="textfield" style="normal" mode="transparent" x="430" y="219" width="173" height="16" positiontype="float" stretchtype="relativetotallestobject"/> <textelement> <font size="7"/> </textelement> <textfieldexpression class="java.lang.string"><![cdata["aaa"]]></textfieldexpression> </textfield> </elementgroup> <elementgroup> <textfield evaluationtime="report" isblankwhennull="true" isstretchwithoverflow="true"> <reportelement key="textfield" style="normal" mode="transparent" x="1" y="229" width="130" height="18" positiontype="float" stretchtype="relativetotallestobject"/> <textelement> <font isbold="true" size="7"/> </textelement> <textfieldexpression class="java.lang.string"><![cdata["value"]]></textfieldexpression> </textfield> <textfield isblankwhennull="true" isstretchwithoverflow="true"> <reportelement key="textfield" style="normal" mode="transparent" x="131" y="229" width="173" height="16" positiontype="float" stretchtype="relativetotallestobject"/> <textelement> <font size="7"/> </textelement> <textfieldexpression class="java.lang.string"><![cdata["aaa"]]></textfieldexpression> </textfield> <textfield evaluationtime="report" isblankwhennull="true" isstretchwithoverflow="true"> <reportelement key="textfield" style="normal" mode="transparent" x="300" y="229" width="130" height="18" positiontype="float" stretchtype="relativetotallestobject"/> <textelement> <font isbold="true" size="7"/> </textelement> <textfieldexpression class="java.lang.string"><![cdata["value"]]></textfieldexpression> </textfield> <textfield isblankwhennull="true" isstretchwithoverflow="true"> <reportelement key="textfield" style="normal" mode="transparent" x="430" y="229" width="173" height="16" positiontype="float" stretchtype="relativetotallestobject"/> <textelement> <font size="7"/> </textelement> <textfieldexpression class="java.lang.string"><![cdata["aaa"]]></textfieldexpression> </textfield> </elementgroup> <elementgroup> <textfield evaluationtime="report" isblankwhennull="true" isstretchwithoverflow="true"> <reportelement key="textfield" style="normal" mode="transparent" x="1" y="239" width="130" height="18" positiontype="float" stretchtype="relativetotallestobject"/> <textelement> <font isbold="true" size="7"/> </textelement> <textfieldexpression class="java.lang.string"><![cdata["value"]]></textfieldexpression> </textfield> <textfield isblankwhennull="true" isstretchwithoverflow="true"> <reportelement key="textfield" style="normal" mode="transparent" x="131" y="239" width="173" height="16" positiontype="float" stretchtype="relativetotallestobject"/> <textelement> <font size="7"/> </textelement> <textfieldexpression class="java.lang.string"><![cdata["aaa"]]></textfieldexpression> </textfield> <textfield evaluationtime="report" isblankwhennull="true" isstretchwithoverflow="true"> <reportelement key="textfield" style="normal" mode="transparent" x="300" y="239" width="130" height="18" positiontype="float" stretchtype="relativetotallestobject"/> <textelement> <font isbold="true" size="7"/> </textelement> <textfieldexpression class="java.lang.string"><![cdata["value"]]></textfieldexpression> </textfield> <textfield isblankwhennull="true" isstretchwithoverflow="true"> <reportelement key="textfield" style="normal" mode="transparent" x="430" y="239" width="173" height="16" positiontype="float" stretchtype="relativetotallestobject"/> <textelement> <font size="7"/> </textelement> <textfieldexpression class="java.lang.string"><![cdata["aaa"]]></textfieldexpression> </textfield> </elementgroup> </band> </pageheader> </jasperreport>


Comments
Post a Comment