jasper reports - split text evenly into 2 columns -


i have long text (general sales conditions) , i'm trying figure out how split 2 columns same height. text isn't static, can change whenever needs changed (e.g. customer specific text) , reason can't split manually. using 2 column page format managed let jasper fill 1 column @ time, customer doesn't want 2 columns different heights. can me?

i'm using jaspersoft studio 6.0.3.

edit: template source

<?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="ordine" columncount="2" pagewidth="595" pageheight="842" columnwidth="287" leftmargin="10" rightmargin="10" topmargin="10" bottommargin="25" issummarywithpageheaderandfooter="true" uuid="65c3fc9b-084e-43e8-8495-f967c93cc50b">     <property name="com.jaspersoft.studio.data.defaultdataadapter" value="ordine datasource"/>     <property name="com.jaspersoft.studio.unit." value="pixel"/>     <property name="com.jaspersoft.studio.unit.pageheight" value="inch"/>     <property name="com.jaspersoft.studio.unit.pagewidth" value="inch"/>     <property name="com.jaspersoft.studio.unit.topmargin" value="pixel"/>     <property name="com.jaspersoft.studio.unit.bottommargin" value="pixel"/>     <property name="com.jaspersoft.studio.unit.leftmargin" value="pixel"/>     <property name="com.jaspersoft.studio.unit.rightmargin" value="pixel"/>     <property name="com.jaspersoft.studio.unit.columnwidth" value="pixel"/>     <property name="com.jaspersoft.studio.unit.columnspacing" value="pixel"/>     <style name="crosstab_ch" mode="opaque" backcolor="rgba(255, 255, 255, 0.0)">         <box>             <pen linewidth="0.5" linecolor="#000000"/>             <toppen linewidth="0.5" linecolor="#000000"/>             <leftpen linewidth="0.5" linecolor="#000000"/>             <bottompen linewidth="0.5" linecolor="#000000"/>             <rightpen linewidth="0.5" linecolor="#000000"/>         </box>     </style>     <style name="crosstab_cg" mode="opaque" backcolor="rgba(255, 255, 255, 0.0)">         <box>             <pen linewidth="0.5" linecolor="#000000"/>             <toppen linewidth="0.5" linecolor="#000000"/>             <leftpen linewidth="0.5" linecolor="#000000"/>             <bottompen linewidth="0.5" linecolor="#000000"/>             <rightpen linewidth="0.5" linecolor="#000000"/>         </box>     </style>     <style name="crosstab_ct" mode="opaque" backcolor="rgba(255, 255, 255, 0.0)">         <box>             <pen linewidth="0.5" linecolor="#000000"/>             <toppen linewidth="0.5" linecolor="#000000"/>             <leftpen linewidth="0.5" linecolor="#000000"/>             <bottompen linewidth="0.5" linecolor="#000000"/>             <rightpen linewidth="0.5" linecolor="#000000"/>         </box>     </style>     <style name="crosstab_cd" mode="opaque" backcolor="rgba(255, 255, 255, 0.0)">         <box>             <pen linewidth="0.5" linecolor="#000000"/>             <toppen linewidth="0.5" linecolor="#000000"/>             <leftpen linewidth="0.5" linecolor="#000000"/>             <bottompen linewidth="0.5" linecolor="#000000"/>             <rightpen linewidth="0.5" linecolor="#000000"/>         </box>     </style>     <style name="crosstab 1_ch" mode="opaque" backcolor="rgba(255, 255, 255, 0.0)">         <box>             <pen linewidth="0.5" linecolor="#000000"/>             <toppen linewidth="0.5" linecolor="#000000"/>             <leftpen linewidth="0.5" linecolor="#000000"/>             <bottompen linewidth="0.5" linecolor="#000000"/>             <rightpen linewidth="0.5" linecolor="#000000"/>         </box>     </style>     <style name="crosstab 1_cg" mode="opaque" backcolor="rgba(255, 255, 255, 0.0)">         <box>             <pen linewidth="0.5" linecolor="#000000"/>             <toppen linewidth="0.5" linecolor="#000000"/>             <leftpen linewidth="0.5" linecolor="#000000"/>             <bottompen linewidth="0.5" linecolor="#000000"/>             <rightpen linewidth="0.5" linecolor="#000000"/>         </box>     </style>     <style name="crosstab 1_ct" mode="opaque" backcolor="rgba(255, 255, 255, 0.0)">         <box>             <pen linewidth="0.5" linecolor="#000000"/>             <toppen linewidth="0.5" linecolor="#000000"/>             <leftpen linewidth="0.5" linecolor="#000000"/>             <bottompen linewidth="0.5" linecolor="#000000"/>             <rightpen linewidth="0.5" linecolor="#000000"/>         </box>     </style>     <style name="crosstab 1_cd" mode="opaque" backcolor="rgba(255, 255, 255, 0.0)">         <box>             <pen linewidth="0.5" linecolor="#000000"/>             <toppen linewidth="0.5" linecolor="#000000"/>             <leftpen linewidth="0.5" linecolor="#000000"/>             <bottompen linewidth="0.5" linecolor="#000000"/>             <rightpen linewidth="0.5" linecolor="#000000"/>         </box>     </style>     <style name="table_th" mode="opaque" backcolor="rgba(255, 255, 255, 0.0)">         <box>             <pen linewidth="0.5" linecolor="#000000"/>             <toppen linewidth="0.5" linecolor="#000000"/>             <leftpen linewidth="0.5" linecolor="#000000"/>             <bottompen linewidth="0.5" linecolor="#000000"/>             <rightpen linewidth="0.5" linecolor="#000000"/>         </box>     </style>     <style name="table_ch" mode="opaque" backcolor="rgba(255, 255, 255, 0.0)">         <box>             <pen linewidth="0.5" linecolor="#000000"/>             <toppen linewidth="0.5" linecolor="#000000"/>             <leftpen linewidth="0.5" linecolor="#000000"/>             <bottompen linewidth="0.5" linecolor="#000000"/>             <rightpen linewidth="0.5" linecolor="#000000"/>         </box>     </style>     <style name="table_td" mode="opaque" backcolor="rgba(255, 255, 255, 0.0)">         <box>             <pen linewidth="0.5" linecolor="#000000"/>             <toppen linewidth="0.5" linecolor="#000000"/>             <leftpen linewidth="0.5" linecolor="#000000"/>             <bottompen linewidth="0.5" linecolor="#000000"/>             <rightpen linewidth="0.5" linecolor="#000000"/>         </box>     </style>     <style name="table 1_th" mode="opaque" backcolor="rgba(255, 255, 255, 0.0)">         <box>             <pen linewidth="0.5" linecolor="#000000"/>             <toppen linewidth="0.5" linecolor="#000000"/>             <leftpen linewidth="0.5" linecolor="#000000"/>             <bottompen linewidth="0.5" linecolor="#000000"/>             <rightpen linewidth="0.5" linecolor="#000000"/>         </box>     </style>     <style name="table 1_ch" mode="opaque" backcolor="rgba(255, 255, 255, 0.0)">         <box>             <pen linewidth="0.5" linecolor="#000000"/>             <toppen linewidth="0.5" linecolor="#000000"/>             <leftpen linewidth="0.5" linecolor="#000000"/>             <bottompen linewidth="0.5" linecolor="#000000"/>             <rightpen linewidth="0.5" linecolor="#000000"/>         </box>     </style>     <style name="table 1_td" mode="opaque" backcolor="rgba(255, 255, 255, 0.0)">         <box>             <pen linewidth="0.5" linecolor="#000000"/>             <toppen linewidth="0.5" linecolor="#000000"/>             <leftpen linewidth="0.5" linecolor="#000000"/>             <bottompen linewidth="0.5" linecolor="#000000"/>             <rightpen linewidth="0.5" linecolor="#000000"/>         </box>     </style>     <style name="table 2_th" mode="opaque" backcolor="rgba(255, 255, 255, 0.0)">         <box>             <pen linewidth="0.5" linecolor="#000000"/>             <toppen linewidth="0.5" linecolor="#000000"/>             <leftpen linewidth="0.5" linecolor="#000000"/>             <bottompen linewidth="0.5" linecolor="#000000"/>             <rightpen linewidth="0.5" linecolor="#000000"/>         </box>     </style>     <style name="table 2_ch" mode="opaque" backcolor="rgba(255, 255, 255, 0.0)">         <box>             <pen linewidth="0.5" linecolor="#000000"/>             <toppen linewidth="0.5" linecolor="#000000"/>             <leftpen linewidth="0.5" linecolor="#000000"/>             <bottompen linewidth="0.5" linecolor="#000000"/>             <rightpen linewidth="0.5" linecolor="#000000"/>         </box>     </style>     <style name="table 2_td" mode="opaque" backcolor="rgba(255, 255, 255, 0.0)">         <box>             <pen linewidth="0.5" linecolor="#000000"/>             <toppen linewidth="0.5" linecolor="#000000"/>             <leftpen linewidth="0.5" linecolor="#000000"/>             <bottompen linewidth="0.5" linecolor="#000000"/>             <rightpen linewidth="0.5" linecolor="#000000"/>         </box>     </style>     <style name="table 3_th" mode="opaque" backcolor="rgba(255, 255, 255, 0.0)">         <box>             <pen linewidth="0.5" linecolor="#000000"/>             <toppen linewidth="0.5" linecolor="#000000"/>             <leftpen linewidth="0.5" linecolor="#000000"/>             <bottompen linewidth="0.5" linecolor="#000000"/>             <rightpen linewidth="0.5" linecolor="#000000"/>         </box>     </style>     <style name="table 3_ch" mode="opaque" backcolor="rgba(255, 255, 255, 0.0)">         <box>             <pen linewidth="0.5" linecolor="#000000"/>             <toppen linewidth="0.5" linecolor="#000000"/>             <leftpen linewidth="0.5" linecolor="#000000"/>             <bottompen linewidth="0.5" linecolor="#000000"/>             <rightpen linewidth="0.5" linecolor="#000000"/>         </box>     </style>     <style name="table 3_td" mode="opaque" backcolor="rgba(255, 255, 255, 0.0)">         <box>             <pen linewidth="0.5" linecolor="#000000"/>             <toppen linewidth="0.5" linecolor="#000000"/>             <leftpen linewidth="0.5" linecolor="#000000"/>             <bottompen linewidth="0.5" linecolor="#000000"/>             <rightpen linewidth="0.5" linecolor="#000000"/>         </box>     </style>     <style name="table 4_th" mode="opaque" backcolor="rgba(255, 255, 255, 0.0)">         <box>             <pen linewidth="0.5" linecolor="rgba(0, 0, 0, 0.5019608)"/>             <toppen linewidth="0.5" linecolor="rgba(0, 0, 0, 0.5019608)"/>             <leftpen linewidth="0.5" linecolor="rgba(0, 0, 0, 0.5019608)"/>             <bottompen linewidth="0.5" linecolor="rgba(0, 0, 0, 0.5019608)"/>             <rightpen linewidth="0.5" linecolor="rgba(0, 0, 0, 0.5019608)"/>         </box>     </style>     <style name="table 4_ch" mode="opaque" backcolor="rgba(255, 255, 255, 0.0)">         <box>             <pen linewidth="0.5" linecolor="rgba(0, 0, 0, 0.5019608)"/>             <toppen linewidth="0.5" linecolor="rgba(0, 0, 0, 0.5019608)"/>             <leftpen linewidth="0.5" linecolor="rgba(0, 0, 0, 0.5019608)"/>             <bottompen linewidth="0.5" linecolor="rgba(0, 0, 0, 0.5019608)"/>             <rightpen linewidth="0.5" linecolor="rgba(0, 0, 0, 0.5019608)"/>         </box>     </style>     <style name="table 4_td" mode="opaque" backcolor="rgba(255, 255, 255, 0.0)">         <box>             <pen linewidth="0.5" linecolor="rgba(0, 0, 0, 0.5019608)"/>             <toppen linewidth="0.5" linecolor="rgba(0, 0, 0, 0.5019608)"/>             <leftpen linewidth="0.5" linecolor="rgba(0, 0, 0, 0.5019608)"/>             <bottompen linewidth="0.5" linecolor="rgba(0, 0, 0, 0.5019608)"/>             <rightpen linewidth="0.5" linecolor="rgba(0, 0, 0, 0.5019608)"/>         </box>     </style>     <subdataset name="dataset spedizioni" uuid="9502f1d6-9de4-4b21-beee-448949826f41">         <property name="com.jaspersoft.studio.data.defaultdataadapter" value="ordine datasource"/>         <querystring language="xpath">             <![cdata[/ordine/tempi_consegna/spedizione]]>         </querystring>         <field name="collezione" class="java.lang.string">             <fielddescription><![cdata[collezione]]></fielddescription>         </field>         <field name="capi" class="java.lang.string">             <fielddescription><![cdata[capi]]></fielddescription>         </field>         <field name="valore" class="java.lang.string">             <fielddescription><![cdata[valore]]></fielddescription>         </field>         <field name="consegna" class="java.lang.string">             <fielddescription><![cdata[consegna]]></fielddescription>         </field>     </subdataset>     <parameter name="pages" class="java.lang.integer" isforprompting="false">         <parameterdescription><![cdata[number of pages of complete document]]></parameterdescription>         <defaultvalueexpression><![cdata[0]]></defaultvalueexpression>     </parameter>     <parameter name="tot_pages" class="java.lang.integer" isforprompting="false">         <parameterdescription><![cdata[total number of pages of complete document]]></parameterdescription>         <defaultvalueexpression><![cdata[0]]></defaultvalueexpression>     </parameter>     <querystring language="xpath">         <![cdata[/]]>     </querystring>     <field name="riepilogo_classe_collezione" class="java.lang.string">         <fielddescription><![cdata[collezione]]></fielddescription>     </field>     <field name="termine" class="java.lang.string">         <fielddescription><![cdata[termine]]></fielddescription>     </field>     <field name="importo_caparra" class="java.lang.integer">         <fielddescription><![cdata[/ordine/importo_caparra]]></fielddescription>     </field>     <field name="data_caparra" class="java.lang.string">         <fielddescription><![cdata[/ordine/data_caparra]]></fielddescription>     </field>     <field name="tot_pezzi" class="java.lang.integer">         <fielddescription><![cdata[/ordine/corpo_ordine/tot_pezzi]]></fielddescription>     </field>     <field name="tot_prezzo" class="java.lang.float">         <fielddescription><![cdata[/ordine/corpo_ordine/tot_prezzo]]></fielddescription>     </field>     <field name="numero_ordine" class="java.lang.string">         <fielddescription><![cdata[/ordine/testata_colonna/nordine]]></fielddescription>     </field>     <field name="perc_caparra" class="java.lang.string">         <fielddescription><![cdata[/ordine/perc_caparra]]></fielddescription>     </field>     <field name="cgv" class="java.lang.string">         <fielddescription><![cdata[/ordine/cgv]]></fielddescription>     </field>     <variable name="totale_prezzo" class="java.lang.string">         <variableexpression><![cdata[substitute(fixed($f{tot_prezzo},2,true),",",".")]]></variableexpression>         <initialvalueexpression><![cdata[substitute(fixed($f{tot_prezzo},2,true),",",".")]]></initialvalueexpression>     </variable>     <background>         <band splittype="stretch"/>     </background>     <pageheader>         <band height="242" splittype="stretch">             <property name="local_mesure_unitheight" value="pixel"/>             <property name="com.jaspersoft.studio.unit.height" value="px"/>             <subreport>                 <reportelement x="0" y="0" width="575" height="220" uuid="9af9bfdd-49fa-493d-a426-1143aa5afe10">                     <property name="local_mesure_unitheight" value="pixel"/>                     <property name="com.jaspersoft.studio.unit.height" value="px"/>                 </reportelement>                 <datasourceexpression><![cdata[((net.sf.jasperreports.engine.data.jrxmldatasource) $p{report_data_source}).datasource("/")]]></datasourceexpression>                 <subreportexpression><![cdata["test header.jasper"]]></subreportexpression>             </subreport>             <statictext>                 <reportelement isprintrepeatedvalues="false" mode="transparent" x="0" y="230" width="575" height="12" isprintinfirstwholeband="true" backcolor="#ffffff" uuid="3068ac8d-30a2-465b-92f9-9f4b37b8341f">                     <property name="local_mesure_unitheight" value="pixel"/>                     <property name="com.jaspersoft.studio.unit.height" value="px"/>                     <property name="local_mesure_unity" value="pixel"/>                     <property name="com.jaspersoft.studio.unit.y" value="px"/>                     <printwhenexpression><![cdata[$v{page_number} == 1]]></printwhenexpression>                 </reportelement>                 <textelement textalignment="center" verticalalignment="middle">                     <font fontname="times new roman" size="6" pdffontname="times-roman"/>                 </textelement>                 <text><![cdata[condizioni generali di vendita]]></text>             </statictext>         </band>     </pageheader>     <detail>         <band height="20" splittype="stretch">             <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.horizontalrowlayout"/>             <property name="local_mesure_unitheight" value="pixel"/>             <property name="com.jaspersoft.studio.unit.height" value="px"/>             <textfield isstretchwithoverflow="true">                 <reportelement key="" mode="transparent" x="0" y="0" width="280" height="20" isprintwhendetailoverflows="true" forecolor="#000000" backcolor="#ffffff" uuid="560b6965-4658-4cc8-ad80-a9da918b3dfd">                     <property name="local_mesure_unitheight" value="pixel"/>                     <property name="com.jaspersoft.studio.unit.height" value="px"/>                 </reportelement>                 <textelement textalignment="justified" verticalalignment="top" rotation="none" markup="none">                     <font fontname="times new roman" size="5" isbold="false" isitalic="false" isunderline="false" isstrikethrough="false" pdffontname="times-roman" pdfencoding="cp1252" ispdfembedded="false"/>                     <paragraph linespacing="fixed" linespacingsize="6.0"/>                 </textelement>                 <textfieldexpression><![cdata[$f{cgv}]]></textfieldexpression>             </textfield>         </band>     </detail>     <columnfooter>         <band height="5">             <property name="local_mesure_unitheight" value="pixel"/>             <property name="com.jaspersoft.studio.unit.height" value="px"/>         </band>     </columnfooter>     <pagefooter>         <band height="12">             <textfield>                 <reportelement x="365" y="0" width="185" height="12" uuid="aaf52d54-2ce4-43b0-a2e7-ad24fdc93008">                     <property name="local_mesure_unitheight" value="pixel"/>                     <property name="com.jaspersoft.studio.unit.height" value="px"/>                 </reportelement>                 <textelement textalignment="right" verticalalignment="bottom">                     <font fontname="times new roman" size="7" pdffontname="times roman"/>                 </textelement>                 <textfieldexpression><![cdata["pag. " + ($p{pages} + $v{page_number})]]></textfieldexpression>             </textfield>         </band>     </pagefooter>     <lastpagefooter>         <band height="12">             <property name="local_mesure_unitheight" value="pixel"/>             <property name="com.jaspersoft.studio.unit.height" value="px"/>             <textfield>                 <reportelement x="365" y="0" width="185" height="12" uuid="21d83b11-43c6-42e1-83d2-47f8e5b0dc56">                     <property name="local_mesure_unitheight" value="pixel"/>                     <property name="com.jaspersoft.studio.unit.height" value="px"/>                     <property name="local_mesure_unity" value="pixel"/>                     <property name="com.jaspersoft.studio.unit.y" value="px"/>                 </reportelement>                 <textelement textalignment="right" verticalalignment="bottom">                     <font fontname="times new roman" size="7" pdffontname="times roman"/>                 </textelement>                 <textfieldexpression><![cdata["pag. " + ($p{pages} + $v{page_number})]]></textfieldexpression>             </textfield>         </band>     </lastpagefooter>     <summary>         <band height="30" splittype="stretch">             <property name="local_mesure_unitheight" value="pixel"/>             <property name="com.jaspersoft.studio.unit.height" value="px"/>             <subreport>                 <reportelement stretchtype="relativetotallestobject" x="0" y="0" width="575" height="30" uuid="5d9c20d8-b014-47f7-8176-788c90ae79c8"/>                 <parametersmapexpression><![cdata[(new java.util.hashmap()).put("tot_pages", $p{tot_pages})]]></parametersmapexpression>                 <subreportparameter name="tot_pages">                     <subreportparameterexpression><![cdata[$p{tot_pages}]]></subreportparameterexpression>                 </subreportparameter>                 <datasourceexpression><![cdata[((net.sf.jasperreports.engine.data.jrxmldatasource) $p{report_data_source}).datasource("/ordine/tempi_consegna/spedizione")]]></datasourceexpression>                 <subreportexpression><![cdata["test cgv tabella.jasper"]]></subreportexpression>             </subreport>         </band>     </summary> </jasperreport> 

the template datasource xml


Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

order - Notification for user in user account opencart -