Jump to content
We've recently updated our Privacy Statement, available here ×

page break in a textfield in a subreport


pt_1

Recommended Posts

Hi everyone,

there are two textfields in a subreport. The textfields should be streched, so that both have the same size, even though one contains more text.

The layout looks like:

 

________________________

|      Text1         |           Text2         |

 

 

This worked already, with this changes.

Position Type: Float

Strech Type: Relative To Tallest Object

Strech With Overflow: true

 

But if one of the texts is too large for one page, so we need a page break, on the second page the second textfield disappeared and the first textfield uses the whole page size.

 

How can i fix this, that both textfields are shown on the second page?

Thanks

Link to comment
Share on other sites

  • Replies 12
  • Created
  • Last Reply

Top Posters In This Topic

2016-06-2711_08_57-TIBCOJaspersoftStudio.png.b4855a9bcf2d3ce90cd5ea59930b4336.png

The $F{value}-textfield is the field, which could get the large size.

 

Some more informations:

On the second page the field $F{constValue} exists, but the field $P{dataelementIsConst} does not exist (i think the $P{dataelementValue} overrides $P{dataelementIsConst} on the first page, so that $P{dataelementIsConst} is printed, but it is in the background).

----------------------------------------------------------------------------------------

My JRXML-File:

<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.1.0.final using JasperReports Library version 6.1.0  -->
<!-- 2016-06-27T11:09:16 -->
<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="DataElement" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="46d64568-e713-4066-843b-d83c8be32aa2">
    <parameter name="name" class="java.lang.String">
        <parameterDescription><![CDATA[name]]></parameterDescription>
    </parameter>
    <parameter name="typ" class="java.lang.String">
        <parameterDescription><![CDATA[typ]]></parameterDescription>
    </parameter>
    <parameter name="description" class="java.lang.String">
        <parameterDescription><![CDATA[description]]></parameterDescription>
    </parameter>
    <parameter name="dataelementValue" class="java.lang.String">
        <parameterDescription><![CDATA[value]]></parameterDescription>
    </parameter>
    <parameter name="dataelementIsConst" class="java.lang.String">
        <parameterDescription><![CDATA[isConst]]></parameterDescription>
    </parameter>
    <queryString>
        <![CDATA[]]>
    </queryString>
    <field name="name" class="java.lang.String">
        <fieldDescription><![CDATA[name]]></fieldDescription>
    </field>
    <field name="typ" class="java.lang.String">
        <fieldDescription><![CDATA[typ]]></fieldDescription>
    </field>
    <field name="description" class="java.lang.String">
        <fieldDescription><![CDATA[description]]></fieldDescription>
    </field>
    <field name="value" class="java.lang.String">
        <fieldDescription><![CDATA[value]]></fieldDescription>
    </field>
    <field name="constValue" class="java.lang.Boolean">
        <fieldDescription><![CDATA[constValue]]></fieldDescription>
    </field>
    <detail>
        <band height="81" splitType="Stretch">
            <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
            <elementGroup>
                <textField isStretchWithOverflow="true">
                    <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="180" y="30" width="370" height="16" isPrintWhenDetailOverflows="true" uuid="87eaf296-bb3f-4fe3-bd88-d59d2f3894c7">
                        <property name="net.sf.jasperreports.text.save.line.breaks" value="true"/>
                    </reportElement>
                    <box>
                        <topPen lineWidth="1.0"/>
                        <leftPen lineWidth="1.0"/>
                        <bottomPen lineWidth="1.0"/>
                        <rightPen lineWidth="1.0"/>
                    </box>
                    <textFieldExpression><![CDATA[$F{description}]]></textFieldExpression>
                </textField>
                <textField isStretchWithOverflow="true">
                    <reportElement positionType="Float" stretchType="RelativeToTallestObject" mode="Opaque" x="30" y="30" width="150" height="16" isPrintWhenDetailOverflows="true" backcolor="#C9C9C9" uuid="af6a8fad-26f8-4680-8257-0a91845455bb"/>
                    <box>
                        <topPen lineWidth="1.0"/>
                        <leftPen lineWidth="1.0"/>
                        <bottomPen lineWidth="1.0"/>
                        <rightPen lineWidth="1.0"/>
                    </box>
                    <textFieldExpression><![CDATA[$P{description}]]></textFieldExpression>
                </textField>
            </elementGroup>
            <elementGroup>
                <textField isStretchWithOverflow="true">
                    <reportElement positionType="Float" stretchType="RelativeToTallestObject" mode="Opaque" x="30" y="0" width="150" height="14" isPrintWhenDetailOverflows="true" backcolor="#C9C9C9" uuid="824498f6-ded1-4ba3-894e-69fd4b8f5f6b"/>
                    <box>
                        <topPen lineWidth="1.0"/>
                        <leftPen lineWidth="1.0"/>
                        <bottomPen lineWidth="1.0"/>
                        <rightPen lineWidth="1.0"/>
                    </box>
                    <textFieldExpression><![CDATA[$P{name}]]></textFieldExpression>
                </textField>
                <textField isStretchWithOverflow="true">
                    <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="180" y="0" width="370" height="14" isPrintWhenDetailOverflows="true" uuid="39c80092-28ec-4927-a087-8cda2a883a2c">
                        <property name="net.sf.jasperreports.text.save.line.breaks" value="true"/>
                    </reportElement>
                    <box>
                        <topPen lineWidth="1.0"/>
                        <leftPen lineWidth="1.0"/>
                        <bottomPen lineWidth="1.0"/>
                        <rightPen lineWidth="1.0"/>
                    </box>
                    <textFieldExpression><![CDATA[$F{name}]]></textFieldExpression>
                </textField>
            </elementGroup>
            <elementGroup>
                <textField isStretchWithOverflow="true">
                    <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="180" y="14" width="370" height="16" isPrintWhenDetailOverflows="true" uuid="e6d13b9a-84e6-4858-81ca-43afd7d2f564">
                        <property name="net.sf.jasperreports.text.save.line.breaks" value="true"/>
                    </reportElement>
                    <box>
                        <topPen lineWidth="1.0"/>
                        <leftPen lineWidth="1.0"/>
                        <bottomPen lineWidth="1.0"/>
                        <rightPen lineWidth="1.0"/>
                    </box>
                    <textFieldExpression><![CDATA[$F{typ}]]></textFieldExpression>
                </textField>
                <textField isStretchWithOverflow="true">
                    <reportElement positionType="Float" stretchType="RelativeToTallestObject" mode="Opaque" x="30" y="14" width="150" height="16" isPrintWhenDetailOverflows="true" backcolor="#C9C9C9" uuid="ff696328-1d68-49ea-a5f4-3dc26f32cdab"/>
                    <box>
                        <topPen lineWidth="1.0"/>
                        <leftPen lineWidth="1.0"/>
                        <bottomPen lineWidth="1.0"/>
                        <rightPen lineWidth="1.0"/>
                    </box>
                    <textFieldExpression><![CDATA[$P{typ}]]></textFieldExpression>
                </textField>
            </elementGroup>
            <elementGroup>
                <textField isStretchWithOverflow="true">
                    <reportElement positionType="Float" stretchType="RelativeToTallestObject" mode="Opaque" x="30" y="46" width="150" height="14" isPrintWhenDetailOverflows="true" backcolor="#C9C9C9" uuid="1cf13714-3c50-49a9-91c3-fc3500168dbd"/>
                    <box>
                        <topPen lineWidth="1.0"/>
                        <leftPen lineWidth="1.0"/>
                        <bottomPen lineWidth="1.0"/>
                        <rightPen lineWidth="1.0"/>
                    </box>
                    <textFieldExpression><![CDATA[$P{dataelementValue}]]></textFieldExpression>
                </textField>
                <textField isStretchWithOverflow="true">
                    <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="180" y="46" width="370" height="14" isPrintWhenDetailOverflows="true" uuid="93b4e675-5dc7-4caa-bc62-5151ab539aad">
                        <property name="net.sf.jasperreports.text.save.line.breaks" value="true"/>
                    </reportElement>
                    <box>
                        <topPen lineWidth="1.0"/>
                        <leftPen lineWidth="1.0"/>
                        <bottomPen lineWidth="1.0"/>
                        <rightPen lineWidth="1.0"/>
                    </box>
                    <textFieldExpression><![CDATA[$F{value}]]></textFieldExpression>
                </textField>
            </elementGroup>
            <elementGroup>
                <textField isStretchWithOverflow="true">
                    <reportElement positionType="Float" stretchType="RelativeToTallestObject" mode="Opaque" x="30" y="60" width="150" height="14" isPrintWhenDetailOverflows="true" backcolor="#C9C9C9" uuid="48263ba9-cdbe-4358-9be6-649b1061ed13"/>
                    <box>
                        <topPen lineWidth="1.0"/>
                        <leftPen lineWidth="1.0"/>
                        <bottomPen lineWidth="1.0"/>
                        <rightPen lineWidth="1.0"/>
                    </box>
                    <textFieldExpression><![CDATA[$P{dataelementIsConst}]]></textFieldExpression>
                </textField>
                <textField isStretchWithOverflow="true">
                    <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="180" y="60" width="370" height="14" isPrintWhenDetailOverflows="true" uuid="5740b2f6-ab7f-4d76-8dac-88b65c2f47ae">
                        <property name="net.sf.jasperreports.text.save.line.breaks" value="true"/>
                    </reportElement>
                    <box>
                        <topPen lineWidth="1.0"/>
                        <leftPen lineWidth="1.0"/>
                        <bottomPen lineWidth="1.0"/>
                        <rightPen lineWidth="1.0"/>
                    </box>
                    <textFieldExpression><![CDATA[$F{constValue}]]></textFieldExpression>
                </textField>
            </elementGroup>
        </band>
    </detail>
</jasperReport>
 

Link to comment
Share on other sites

2016-06-2711_08_57-TIBCOJaspersoftStudio(1).png.e1ef7b380be9eaaaba6b84bae00dd5a3.png

 

The $F{value}-textfield is the field, which could get the large size.

 

Some more informations:

On the second page the field $F{constValue} exists, but the field $P{dataelementIsConst} does not exist (i think the $P{dataelementValue} overrides $P{dataelementIsConst} on the first page, so that $P{dataelementIsConst} is printed, but it is in the background).

 

------------------------------------------------------------------------------------------------------------------------------------------

<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.1.0.final using JasperReports Library version 6.1.0  -->
<!-- 2016-06-27T11:09:16 -->
<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="DataElement" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="46d64568-e713-4066-843b-d83c8be32aa2">
    <parameter name="name" class="java.lang.String">
        <parameterDescription><![CDATA[name]]></parameterDescription>
    </parameter>
    <parameter name="typ" class="java.lang.String">
        <parameterDescription><![CDATA[typ]]></parameterDescription>
    </parameter>
    <parameter name="description" class="java.lang.String">
        <parameterDescription><![CDATA[description]]></parameterDescription>
    </parameter>
    <parameter name="dataelementValue" class="java.lang.String">
        <parameterDescription><![CDATA[value]]></parameterDescription>
    </parameter>
    <parameter name="dataelementIsConst" class="java.lang.String">
        <parameterDescription><![CDATA[isConst]]></parameterDescription>
    </parameter>
    <queryString>
        <![CDATA[]]>
    </queryString>
    <field name="name" class="java.lang.String">
        <fieldDescription><![CDATA[name]]></fieldDescription>
    </field>
    <field name="typ" class="java.lang.String">
        <fieldDescription><![CDATA[typ]]></fieldDescription>
    </field>
    <field name="description" class="java.lang.String">
        <fieldDescription><![CDATA[description]]></fieldDescription>
    </field>
    <field name="value" class="java.lang.String">
        <fieldDescription><![CDATA[value]]></fieldDescription>
    </field>
    <field name="constValue" class="java.lang.Boolean">
        <fieldDescription><![CDATA[constValue]]></fieldDescription>
    </field>
    <detail>
        <band height="81" splitType="Stretch">
            <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
            <elementGroup>
                <textField isStretchWithOverflow="true">
                    <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="180" y="30" width="370" height="16" isPrintWhenDetailOverflows="true" uuid="87eaf296-bb3f-4fe3-bd88-d59d2f3894c7">
                        <property name="net.sf.jasperreports.text.save.line.breaks" value="true"/>
                    </reportElement>
                    <box>
                        <topPen lineWidth="1.0"/>
                        <leftPen lineWidth="1.0"/>
                        <bottomPen lineWidth="1.0"/>
                        <rightPen lineWidth="1.0"/>
                    </box>
                    <textFieldExpression><![CDATA[$F{description}]]></textFieldExpression>
                </textField>
                <textField isStretchWithOverflow="true">
                    <reportElement positionType="Float" stretchType="RelativeToTallestObject" mode="Opaque" x="30" y="30" width="150" height="16" isPrintWhenDetailOverflows="true" backcolor="#C9C9C9" uuid="af6a8fad-26f8-4680-8257-0a91845455bb"/>
                    <box>
                        <topPen lineWidth="1.0"/>
                        <leftPen lineWidth="1.0"/>
                        <bottomPen lineWidth="1.0"/>
                        <rightPen lineWidth="1.0"/>
                    </box>
                    <textFieldExpression><![CDATA[$P{description}]]></textFieldExpression>
                </textField>
            </elementGroup>
            <elementGroup>
                <textField isStretchWithOverflow="true">
                    <reportElement positionType="Float" stretchType="RelativeToTallestObject" mode="Opaque" x="30" y="0" width="150" height="14" isPrintWhenDetailOverflows="true" backcolor="#C9C9C9" uuid="824498f6-ded1-4ba3-894e-69fd4b8f5f6b"/>
                    <box>
                        <topPen lineWidth="1.0"/>
                        <leftPen lineWidth="1.0"/>
                        <bottomPen lineWidth="1.0"/>
                        <rightPen lineWidth="1.0"/>
                    </box>
                    <textFieldExpression><![CDATA[$P{name}]]></textFieldExpression>
                </textField>
                <textField isStretchWithOverflow="true">
                    <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="180" y="0" width="370" height="14" isPrintWhenDetailOverflows="true" uuid="39c80092-28ec-4927-a087-8cda2a883a2c">
                        <property name="net.sf.jasperreports.text.save.line.breaks" value="true"/>
                    </reportElement>
                    <box>
                        <topPen lineWidth="1.0"/>
                        <leftPen lineWidth="1.0"/>
                        <bottomPen lineWidth="1.0"/>
                        <rightPen lineWidth="1.0"/>
                    </box>
                    <textFieldExpression><![CDATA[$F{name}]]></textFieldExpression>
                </textField>
            </elementGroup>
            <elementGroup>
                <textField isStretchWithOverflow="true">
                    <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="180" y="14" width="370" height="16" isPrintWhenDetailOverflows="true" uuid="e6d13b9a-84e6-4858-81ca-43afd7d2f564">
                        <property name="net.sf.jasperreports.text.save.line.breaks" value="true"/>
                    </reportElement>
                    <box>
                        <topPen lineWidth="1.0"/>
                        <leftPen lineWidth="1.0"/>
                        <bottomPen lineWidth="1.0"/>
                        <rightPen lineWidth="1.0"/>
                    </box>
                    <textFieldExpression><![CDATA[$F{typ}]]></textFieldExpression>
                </textField>
                <textField isStretchWithOverflow="true">
                    <reportElement positionType="Float" stretchType="RelativeToTallestObject" mode="Opaque" x="30" y="14" width="150" height="16" isPrintWhenDetailOverflows="true" backcolor="#C9C9C9" uuid="ff696328-1d68-49ea-a5f4-3dc26f32cdab"/>
                    <box>
                        <topPen lineWidth="1.0"/>
                        <leftPen lineWidth="1.0"/>
                        <bottomPen lineWidth="1.0"/>
                        <rightPen lineWidth="1.0"/>
                    </box>
                    <textFieldExpression><![CDATA[$P{typ}]]></textFieldExpression>
                </textField>
            </elementGroup>
            <elementGroup>
                <textField isStretchWithOverflow="true">
                    <reportElement positionType="Float" stretchType="RelativeToTallestObject" mode="Opaque" x="30" y="46" width="150" height="14" isPrintWhenDetailOverflows="true" backcolor="#C9C9C9" uuid="1cf13714-3c50-49a9-91c3-fc3500168dbd"/>
                    <box>
                        <topPen lineWidth="1.0"/>
                        <leftPen lineWidth="1.0"/>
                        <bottomPen lineWidth="1.0"/>
                        <rightPen lineWidth="1.0"/>
                    </box>
                    <textFieldExpression><![CDATA[$P{dataelementValue}]]></textFieldExpression>
                </textField>
                <textField isStretchWithOverflow="true">
                    <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="180" y="46" width="370" height="14" isPrintWhenDetailOverflows="true" uuid="93b4e675-5dc7-4caa-bc62-5151ab539aad">
                        <property name="net.sf.jasperreports.text.save.line.breaks" value="true"/>
                    </reportElement>
                    <box>
                        <topPen lineWidth="1.0"/>
                        <leftPen lineWidth="1.0"/>
                        <bottomPen lineWidth="1.0"/>
                        <rightPen lineWidth="1.0"/>
                    </box>
                    <textFieldExpression><![CDATA[$F{value}]]></textFieldExpression>
                </textField>
            </elementGroup>
            <elementGroup>
                <textField isStretchWithOverflow="true">
                    <reportElement positionType="Float" stretchType="RelativeToTallestObject" mode="Opaque" x="30" y="60" width="150" height="14" isPrintWhenDetailOverflows="true" backcolor="#C9C9C9" uuid="48263ba9-cdbe-4358-9be6-649b1061ed13"/>
                    <box>
                        <topPen lineWidth="1.0"/>
                        <leftPen lineWidth="1.0"/>
                        <bottomPen lineWidth="1.0"/>
                        <rightPen lineWidth="1.0"/>
                    </box>
                    <textFieldExpression><![CDATA[$P{dataelementIsConst}]]></textFieldExpression>
                </textField>
                <textField isStretchWithOverflow="true">
                    <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="180" y="60" width="370" height="14" isPrintWhenDetailOverflows="true" uuid="5740b2f6-ab7f-4d76-8dac-88b65c2f47ae">
                        <property name="net.sf.jasperreports.text.save.line.breaks" value="true"/>
                    </reportElement>
                    <box>
                        <topPen lineWidth="1.0"/>
                        <leftPen lineWidth="1.0"/>
                        <bottomPen lineWidth="1.0"/>
                        <rightPen lineWidth="1.0"/>
                    </box>
                    <textFieldExpression><![CDATA[$F{constValue}]]></textFieldExpression>
                </textField>
            </elementGroup>
        </band>
    </detail>
</jasperReport>
 

Link to comment
Share on other sites


2016-06-2711_08_57-TIBCOJaspersoftStudio(2).png.b0f390d95da67c2c3fa9c6f845a0a2ab.png

 

The $F{value}-textfield is the field, which could get the large size.

Some more informations:

On the second page the field $F{constValue} exists, but the field $P{dataelementIsConst} does not exist (i think the $P{dataelementValue} overrides $P{dataelementIsConst} on the first page, so that $P{dataelementIsConst} is printed, but it is in the background).

<?xml version="1.0" encoding="UTF-8"?><!-- Created with Jaspersoft Studio version 6.1.0.final using JasperReports Library version 6.1.0  --><!-- 2016-06-27T11:09:16 --><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="DataElement" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="46d64568-e713-4066-843b-d83c8be32aa2">    <parameter name="name" class="java.lang.String">        <parameterDescription><![CDATA[name]]></parameterDescription>    </parameter>    <parameter name="typ" class="java.lang.String">        <parameterDescription><![CDATA[typ]]></parameterDescription>    </parameter>    <parameter name="description" class="java.lang.String">        <parameterDescription><![CDATA[description]]></parameterDescription>    </parameter>    <parameter name="dataelementValue" class="java.lang.String">        <parameterDescription><![CDATA[value]]></parameterDescription>    </parameter>    <parameter name="dataelementIsConst" class="java.lang.String">        <parameterDescription><![CDATA[isConst]]></parameterDescription>    </parameter>    <queryString>        <![CDATA[]]>    </queryString>    <field name="name" class="java.lang.String">        <fieldDescription><![CDATA[name]]></fieldDescription>    </field>    <field name="typ" class="java.lang.String">        <fieldDescription><![CDATA[typ]]></fieldDescription>    </field>    <field name="description" class="java.lang.String">        <fieldDescription><![CDATA[description]]></fieldDescription>    </field>    <field name="value" class="java.lang.String">        <fieldDescription><![CDATA[value]]></fieldDescription>    </field>    <field name="constValue" class="java.lang.Boolean">        <fieldDescription><![CDATA[constValue]]></fieldDescription>    </field>    <detail>        <band height="81" splitType="Stretch">            <property name="com.jaspersoft.studio.unit.height" value="pixel"/>            <elementGroup>                <textField isStretchWithOverflow="true">                    <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="180" y="30" width="370" height="16" isPrintWhenDetailOverflows="true" uuid="87eaf296-bb3f-4fe3-bd88-d59d2f3894c7">                        <property name="net.sf.jasperreports.text.save.line.breaks" value="true"/>                    </reportElement>                    <box>                        <topPen lineWidth="1.0"/>                        <leftPen lineWidth="1.0"/>                        <bottomPen lineWidth="1.0"/>                        <rightPen lineWidth="1.0"/>                    </box>                    <textFieldExpression><![CDATA[$F{description}]]></textFieldExpression>                </textField>                <textField isStretchWithOverflow="true">                    <reportElement positionType="Float" stretchType="RelativeToTallestObject" mode="Opaque" x="30" y="30" width="150" height="16" isPrintWhenDetailOverflows="true" backcolor="#C9C9C9" uuid="af6a8fad-26f8-4680-8257-0a91845455bb"/>                    <box>                        <topPen lineWidth="1.0"/>                        <leftPen lineWidth="1.0"/>                        <bottomPen lineWidth="1.0"/>                        <rightPen lineWidth="1.0"/>                    </box>                    <textFieldExpression><![CDATA[$P{description}]]></textFieldExpression>                </textField>            </elementGroup>            <elementGroup>                <textField isStretchWithOverflow="true">                    <reportElement positionType="Float" stretchType="RelativeToTallestObject" mode="Opaque" x="30" y="0" width="150" height="14" isPrintWhenDetailOverflows="true" backcolor="#C9C9C9" uuid="824498f6-ded1-4ba3-894e-69fd4b8f5f6b"/>                    <box>                        <topPen lineWidth="1.0"/>                        <leftPen lineWidth="1.0"/>                        <bottomPen lineWidth="1.0"/>                        <rightPen lineWidth="1.0"/>                    </box>                    <textFieldExpression><![CDATA[$P{name}]]></textFieldExpression>                </textField>                <textField isStretchWithOverflow="true">                    <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="180" y="0" width="370" height="14" isPrintWhenDetailOverflows="true" uuid="39c80092-28ec-4927-a087-8cda2a883a2c">                        <property name="net.sf.jasperreports.text.save.line.breaks" value="true"/>                    </reportElement>                    <box>                        <topPen lineWidth="1.0"/>                        <leftPen lineWidth="1.0"/>                        <bottomPen lineWidth="1.0"/>                        <rightPen lineWidth="1.0"/>                    </box>                    <textFieldExpression><![CDATA[$F{name}]]></textFieldExpression>                </textField>            </elementGroup>            <elementGroup>                <textField isStretchWithOverflow="true">                    <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="180" y="14" width="370" height="16" isPrintWhenDetailOverflows="true" uuid="e6d13b9a-84e6-4858-81ca-43afd7d2f564">                        <property name="net.sf.jasperreports.text.save.line.breaks" value="true"/>                    </reportElement>                    <box>                        <topPen lineWidth="1.0"/>                        <leftPen lineWidth="1.0"/>                        <bottomPen lineWidth="1.0"/>                        <rightPen lineWidth="1.0"/>                    </box>                    <textFieldExpression><![CDATA[$F{typ}]]></textFieldExpression>                </textField>                <textField isStretchWithOverflow="true">                    <reportElement positionType="Float" stretchType="RelativeToTallestObject" mode="Opaque" x="30" y="14" width="150" height="16" isPrintWhenDetailOverflows="true" backcolor="#C9C9C9" uuid="ff696328-1d68-49ea-a5f4-3dc26f32cdab"/>                    <box>                        <topPen lineWidth="1.0"/>                        <leftPen lineWidth="1.0"/>                        <bottomPen lineWidth="1.0"/>                        <rightPen lineWidth="1.0"/>                    </box>                    <textFieldExpression><![CDATA[$P{typ}]]></textFieldExpression>                </textField>            </elementGroup>            <elementGroup>                <textField isStretchWithOverflow="true">                    <reportElement positionType="Float" stretchType="RelativeToTallestObject" mode="Opaque" x="30" y="46" width="150" height="14" isPrintWhenDetailOverflows="true" backcolor="#C9C9C9" uuid="1cf13714-3c50-49a9-91c3-fc3500168dbd"/>                    <box>                        <topPen lineWidth="1.0"/>                        <leftPen lineWidth="1.0"/>                        <bottomPen lineWidth="1.0"/>                        <rightPen lineWidth="1.0"/>                    </box>                    <textFieldExpression><![CDATA[$P{dataelementValue}]]></textFieldExpression>                </textField>                <textField isStretchWithOverflow="true">                    <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="180" y="46" width="370" height="14" isPrintWhenDetailOverflows="true" uuid="93b4e675-5dc7-4caa-bc62-5151ab539aad">                        <property name="net.sf.jasperreports.text.save.line.breaks" value="true"/>                    </reportElement>                    <box>                        <topPen lineWidth="1.0"/>                        <leftPen lineWidth="1.0"/>                        <bottomPen lineWidth="1.0"/>                        <rightPen lineWidth="1.0"/>                    </box>                    <textFieldExpression><![CDATA[$F{value}]]></textFieldExpression>                </textField>            </elementGroup>            <elementGroup>                <textField isStretchWithOverflow="true">                    <reportElement positionType="Float" stretchType="RelativeToTallestObject" mode="Opaque" x="30" y="60" width="150" height="14" isPrintWhenDetailOverflows="true" backcolor="#C9C9C9" uuid="48263ba9-cdbe-4358-9be6-649b1061ed13"/>                    <box>                        <topPen lineWidth="1.0"/>                        <leftPen lineWidth="1.0"/>                        <bottomPen lineWidth="1.0"/>                        <rightPen lineWidth="1.0"/>                    </box>                    <textFieldExpression><![CDATA[$P{dataelementIsConst}]]></textFieldExpression>                </textField>                <textField isStretchWithOverflow="true">                    <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="180" y="60" width="370" height="14" isPrintWhenDetailOverflows="true" uuid="5740b2f6-ab7f-4d76-8dac-88b65c2f47ae">                        <property name="net.sf.jasperreports.text.save.line.breaks" value="true"/>                    </reportElement>                    <box>                        <topPen lineWidth="1.0"/>                        <leftPen lineWidth="1.0"/>                        <bottomPen lineWidth="1.0"/>                        <rightPen lineWidth="1.0"/>                    </box>                    <textFieldExpression><![CDATA[$F{constValue}]]></textFieldExpression>                </textField>            </elementGroup>        </band>    </detail></jasperReport>

 

Link to comment
Share on other sites

2016-06-2711_08_57-TIBCOJaspersoftStudio(3).png.fa1d3176eb11a5b5c832f902e219fbd1.png

The $F{value}-textfield is the field, which could get the large size.

Some more informations:

On the second page the field $F{constValue} exists, but the field $P{dataelementIsConst} does not exist (i think the $P{dataelementValue} overrides $P{dataelementIsConst} on the first page, so that $P{dataelementIsConst} is printed, but it is in the background).

Link to comment
Share on other sites

Code Part1

<?xml version="1.0" encoding="UTF-8"?><!-- Created with Jaspersoft Studio version 6.1.0.final using JasperReports Library version 6.1.0  --><!-- 2016-06-27T11:09:16 --><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="DataElement" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="46d64568-e713-4066-843b-d83c8be32aa2">    <parameter name="name" class="java.lang.String">        <parameterDescription><![CDATA[name]]></parameterDescription>    </parameter>    <parameter name="typ" class="java.lang.String">        <parameterDescription><![CDATA[typ]]></parameterDescription>    </parameter>    <parameter name="description" class="java.lang.String">        <parameterDescription><![CDATA[description]]></parameterDescription>    </parameter>    <parameter name="dataelementValue" class="java.lang.String">        <parameterDescription><![CDATA[value]]></parameterDescription>    </parameter>    <parameter name="dataelementIsConst" class="java.lang.String">        <parameterDescription><![CDATA[isConst]]></parameterDescription>    </parameter>    <queryString>        <![CDATA[]]>    </queryString>    <field name="name" class="java.lang.String">        <fieldDescription><![CDATA[name]]></fieldDescription>    </field>    <field name="typ" class="java.lang.String">        <fieldDescription><![CDATA[typ]]></fieldDescription>    </field>    <field name="description" class="java.lang.String">        <fieldDescription><![CDATA[description]]></fieldDescription>    </field>    <field name="value" class="java.lang.String">        <fieldDescription><![CDATA[value]]></fieldDescription>    </field>    <field name="constValue" class="java.lang.Boolean">        <fieldDescription><![CDATA[constValue]]></fieldDescription>    </field>    <detail>        <band height="81" splitType="Stretch">            <property name="com.jaspersoft.studio.unit.height" value="pixel"/>            <elementGroup>                <textField isStretchWithOverflow="true">                    <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="180" y="30" width="370" height="16" isPrintWhenDetailOverflows="true" uuid="87eaf296-bb3f-4fe3-bd88-d59d2f3894c7">                        <property name="net.sf.jasperreports.text.save.line.breaks" value="true"/>                    </reportElement>                    <box>                        <topPen lineWidth="1.0"/>                        <leftPen lineWidth="1.0"/>                        <bottomPen lineWidth="1.0"/>                        <rightPen lineWidth="1.0"/>                    </box>                    <textFieldExpression><![CDATA[$F{description}]]></textFieldExpression>                </textField>                <textField isStretchWithOverflow="true">                    <reportElement positionType="Float" stretchType="RelativeToTallestObject" mode="Opaque" x="30" y="30" width="150" height="16" isPrintWhenDetailOverflows="true" backcolor="#C9C9C9" uuid="af6a8fad-26f8-4680-8257-0a91845455bb"/>                    <box>                        <topPen lineWidth="1.0"/>                        <leftPen lineWidth="1.0"/>                        <bottomPen lineWidth="1.0"/>                        <rightPen lineWidth="1.0"/>                    </box>                    <textFieldExpression><![CDATA[$P{description}]]></textFieldExpression>                </textField>            </elementGroup>            <elementGroup>                <textField isStretchWithOverflow="true">                    <reportElement positionType="Float" stretchType="RelativeToTallestObject" mode="Opaque" x="30" y="0" width="150" height="14" isPrintWhenDetailOverflows="true" backcolor="#C9C9C9" uuid="824498f6-ded1-4ba3-894e-69fd4b8f5f6b"/>                    <box>                        <topPen lineWidth="1.0"/>                        <leftPen lineWidth="1.0"/>                        <bottomPen lineWidth="1.0"/>                        <rightPen lineWidth="1.0"/>                    </box>                    <textFieldExpression><![CDATA[$P{name}]]></textFieldExpression>                </textField>                <textField isStretchWithOverflow="true">                    <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="180" y="0" width="370" height="14" isPrintWhenDetailOverflows="true" uuid="39c80092-28ec-4927-a087-8cda2a883a2c">                        <property name="net.sf.jasperreports.text.save.line.breaks" value="true"/>                    </reportElement>                    <box>                        <topPen lineWidth="1.0"/>                        <leftPen lineWidth="1.0"/>                        <bottomPen lineWidth="1.0"/>                        <rightPen lineWidth="1.0"/>                    </box>                    <textFieldExpression><![CDATA[$F{name}]]></textFieldExpression>                </textField>            </elementGroup>[/code]

 

Link to comment
Share on other sites

My Code:

....

<detail>
        <band height="81" splitType="Stretch">
            <property name="com.jaspersoft.studio.unit.height" value="pixel"/>

...

            <elementGroup>
                <textField isStretchWithOverflow="true">
                    <reportElement positionType="Float" stretchType="RelativeToTallestObject" mode="Opaque" x="30" y="46" width="150" height="14" isPrintWhenDetailOverflows="true" backcolor="#C9C9C9" uuid="1cf13714-3c50-49a9-91c3-fc3500168dbd"/>
                    <box>
                        <topPen lineWidth="1.0"/>
                        <leftPen lineWidth="1.0"/>
                        <bottomPen lineWidth="1.0"/>
                        <rightPen lineWidth="1.0"/>
                    </box>
                    <textFieldExpression><![CDATA[$P{dataelementValue}]]></textFieldExpression>
                </textField>
                <textField isStretchWithOverflow="true">
                    <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="180" y="46" width="370" height="14" isPrintWhenDetailOverflows="true" uuid="93b4e675-5dc7-4caa-bc62-5151ab539aad">
                        <property name="net.sf.jasperreports.text.save.line.breaks" value="true"/>
                    </reportElement>
                    <box>
                        <topPen lineWidth="1.0"/>
                        <leftPen lineWidth="1.0"/>
                        <bottomPen lineWidth="1.0"/>
                        <rightPen lineWidth="1.0"/>
                    </box>
                    <textFieldExpression><![CDATA[$F{value}]]></textFieldExpression>
                </textField>
            </elementGroup>
            <elementGroup>
                <textField isStretchWithOverflow="true">
                    <reportElement positionType="Float" stretchType="RelativeToTallestObject" mode="Opaque" x="30" y="60" width="150" height="14" isPrintWhenDetailOverflows="true" backcolor="#C9C9C9" uuid="48263ba9-cdbe-4358-9be6-649b1061ed13"/>
                    <box>
                        <topPen lineWidth="1.0"/>
                        <leftPen lineWidth="1.0"/>
                        <bottomPen lineWidth="1.0"/>
                        <rightPen lineWidth="1.0"/>
                    </box>
                    <textFieldExpression><![CDATA[$P{dataelementIsConst}]]></textFieldExpression>
                </textField>
                <textField isStretchWithOverflow="true">
                    <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="180" y="60" width="370" height="14" isPrintWhenDetailOverflows="true" uuid="5740b2f6-ab7f-4d76-8dac-88b65c2f47ae">
                        <property name="net.sf.jasperreports.text.save.line.breaks" value="true"/>
                    </reportElement>
                    <box>
                        <topPen lineWidth="1.0"/>
                        <leftPen lineWidth="1.0"/>
                        <bottomPen lineWidth="1.0"/>
                        <rightPen lineWidth="1.0"/>
                    </box>
                    <textFieldExpression><![CDATA[$F{constValue}]]></textFieldExpression>
                </textField>
            </elementGroup>
        </band>
    </detail>
</jasperReport>

 

Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...