pt_1 Posted June 23, 2016 Share Posted June 23, 2016 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: FloatStrech Type: Relative To Tallest ObjectStrech 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 More sharing options...
lucianc Posted June 23, 2016 Share Posted June 23, 2016 Try to enable Print When Detail Overflows (isPrintWhenDetailOverflows="true" in JRXML) for the two text fields.Regards,Lucian Link to comment Share on other sites More sharing options...
pt_1 Posted June 24, 2016 Author Share Posted June 24, 2016 If "isPrintWhenDetailOverflows" is true, the two textfields are disappeared on the second page. Link to comment Share on other sites More sharing options...
lucianc Posted June 24, 2016 Share Posted June 24, 2016 Could you post a JRXML to reproduce the behaviour? Link to comment Share on other sites More sharing options...
pt_1 Posted June 27, 2016 Author Share Posted June 27, 2016 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 More sharing options...
pt_1 Posted June 27, 2016 Author Share Posted June 27, 2016 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 More sharing options...
pt_1 Posted June 27, 2016 Author Share Posted June 27, 2016 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 More sharing options...
pt_1 Posted June 27, 2016 Author Share Posted June 27, 2016 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 More sharing options...
pt_1 Posted June 27, 2016 Author Share Posted June 27, 2016 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 More sharing options...
pt_1 Posted June 27, 2016 Author Share Posted June 27, 2016 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 More sharing options...
djohnson53 Posted June 27, 2016 Share Posted June 27, 2016 Patrick (pt_1) was running into a bug in my spam rule. the multiple answers are my fault, not Patricks. Link to comment Share on other sites More sharing options...
lucianc Posted July 6, 2016 Share Posted July 6, 2016 Element groups are not a good way to isolate elements that need to be printed together. Try using frames, or (even safer) separate detail bands for each line.Regards,Lucian Link to comment Share on other sites More sharing options...
pt_1 Posted July 13, 2016 Author Share Posted July 13, 2016 Thanks Lucian, it works.Regards,Patrick (pt_1) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now