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.

as is: enter image description here

to be: enter image description here

is possible? if jasper in version 3.5.2 support things this?

i read issue, , many people said that:

  1. every filed have use isstretchwithoverflow="true"
  2. every reportelement have use positiontype="float" , stretchtype="relativetotallestobject"

  3. 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

Popular posts from this blog

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

html - How to custom Bootstrap grid height? -

transpose - Maple isnt executing function but prints function term -