2006 IR Open Dicussion Posted August 27, 2006 Share Posted August 27, 2006 By: akolmakov - akolmakov Stretch Problem. 2006-08-14 05:48I have 2 groups of elements, which are on the title band: the first is a option name with option value, and the second is the report header. They are placed one under one. Graphically it looks that: ------------------------------------------------ |option1Name| |option1Value| |option2Name| |option2Value| |option2Name| |option3Value| ------------------------------------------------ ---------------------- reportHeader ---------------------- When optionValue is overflown, then between groups there are empty lines, how it can be fixed? Following is an excerpt from the report template: <title> <band height="103" isSplitAllowed="false" > <textField isStretchWithOverflow="true" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="0" y="77" width="932" height="26" key="textField-1" positionType="Float"/> <box topBorder="1Point" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="1Point" bottomBorderColor="#000000"/> <textElement verticalAlignment="Bottom" rotation="None" lineSpacing="Single"> <font fontName="SansSerif" pdfFontName="Helvetica" size="18" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="Cp1252" isStrikeThrough="false" /> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$R{header.summaryTitle} + (($P{order_n} != null && !$P{order_n}.equals("")) ? " " + $R{header.summaryTitlePart2} + $P{order_n} : "")]]></textFieldExpression> </textField> <elementGroup><!-- Start: 25 !--> <elementGroup><!-- Start: 25.23 !--> <textField isStretchWithOverflow="true" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="324" y="42" width="100" height="14" key="textField-31" positionType="Float"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement verticalAlignment="Top"> <font/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$P{order_processing}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement mode="Opaque" x="219" y="42" width="90" height="14" key="textField-32" stretchType="RelativeToTallestObject" positionType="Float"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement verticalAlignment="Top"> <font/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA["Order Processing:"]]></textFieldExpression> </textField> </elementGroup><!-- End 25.23 !--> </elementGroup><!-- End 25 !--> <elementGroup><!-- Start: 28 !--> <elementGroup><!-- Start: 28.26 !--> <textField isStretchWithOverflow="true" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="545" y="0" width="300" height="14" key="textField-33"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="1Point" bottomBorderColor="#000000"/> <textElement verticalAlignment="Top"> <font/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$P{rate_symbols}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="440" y="0" width="90" height="14" key="textField-34" stretchType="RelativeToTallestObject" positionType="Float"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="1Point" bottomBorderColor="#000000"/> <textElement verticalAlignment="Top"> <font/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA["Instruments:"]]></textFieldExpression> </textField> </elementGroup><!-- End 28.26 !--> </elementGroup><!-- End 28 !--> <elementGroup><!-- Start: 19 !--> <elementGroup><!-- Start: 19.16 !--> <textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="0" y="28" width="90" height="14" key="textField-35"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement verticalAlignment="Top"> <font/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA["Date Period:"]]></textFieldExpression> </textField> <textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="105" y="28" width="100" height="14" key="textField-36" positionType="Float"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement verticalAlignment="Top"> <font/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[""]]></textFieldExpression> </textField> </elementGroup><!-- End 19.16 !--> <elementGroup><!-- Start: 19.17 !--> <textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="28" y="42" width="62" height="14" key="textField-37" positionType="Float"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement verticalAlignment="Top"> <font/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA["From:"]]></textFieldExpression> </textField> <textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="105" y="42" width="100" height="14" key="textField-38" stretchType="RelativeToTallestObject" positionType="Float"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement verticalAlignment="Top"> <font/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$P{date_start} == null ? "Ignore" : $P{report_utils}.getTimeZoneFormatter().format($P{date_start})]]></textFieldExpression> </textField> </elementGroup><!-- End 19.17 !--> <elementGroup><!-- Start: 19.18 !--> <textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="28" y="56" width="62" height="14" key="textField-39" positionType="Float"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement verticalAlignment="Top"> <font/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA["To:"]]></textFieldExpression> </textField> <textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="105" y="56" width="100" height="14" key="textField-40" positionType="Float"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement verticalAlignment="Top"> <font/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$P{date_end} == null ? "Ignore" : $P{report_utils}.getTimeZoneFormatter().format($P{date_end})]]></textFieldExpression> </textField> </elementGroup><!-- End 19.18 !--> </elementGroup><!-- End 19 !--> <elementGroup><!-- Start: 25 !--> <elementGroup><!-- Start: 25.20 !--> <textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="219" y="0" width="90" height="14" key="textField-49" positionType="Float"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement verticalAlignment="Top"> <font/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA["Order Type:"]]></textFieldExpression> </textField> <textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="324" y="0" width="100" height="14" key="textField-50"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement verticalAlignment="Top"> <font/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$P{order_type}]]></textFieldExpression> </textField> </elementGroup><!-- End 25.20 !--> <elementGroup><!-- Start: 25.21 !--> <textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="219" y="14" width="90" height="14" key="textField-51" positionType="Float"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement verticalAlignment="Top"> <font/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA["Order Duration:"]]></textFieldExpression> </textField> <textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="324" y="14" width="100" height="14" key="textField-52" positionType="Float"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement verticalAlignment="Top"> <font/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$P{order_duration}]]></textFieldExpression> </textField> </elementGroup><!-- End 25.21 !--> <elementGroup><!-- Start: 25.22 !--> <textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="324" y="28" width="100" height="14" key="textField-53" positionType="Float"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement verticalAlignment="Top"> <font/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$P{order_execution}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="219" y="28" width="90" height="14" key="textField-54" positionType="Float"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement verticalAlignment="Top"> <font/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA["Order Execution:"]]></textFieldExpression> </textField> </elementGroup><!-- End 25.22 !--> <elementGroup><!-- Start: 25.24 !--> <textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="219" y="56" width="90" height="14" key="textField-55" positionType="Float"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement verticalAlignment="Top"> <font/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA["Order Amount:"]]></textFieldExpression> </textField> <textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="324" y="56" width="100" height="14" key="textField-56" positionType="Float"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="1Point" bottomBorderColor="#000000"/> <textElement verticalAlignment="Top"> <font/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$P{order_amount_range}]]></textFieldExpression> </textField> </elementGroup><!-- End 25.24 !--> </elementGroup><!-- End 25 !--> <elementGroup><!-- Start: 28 !--> <elementGroup><!-- Start: 28.27 !--> <textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="545" y="14" width="100" height="14" key="textField-57" positionType="Float"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="1Point" bottomBorderColor="#000000"/> <textElement verticalAlignment="Top"> <font/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$P{rate_range}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="440" y="14" width="90" height="14" key="textField-58" positionType="Float"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="1Point" bottomBorderColor="#000000"/> <textElement verticalAlignment="Top"> <font/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA["Rate:"]]></textFieldExpression> </textField> </elementGroup><!-- End 28.27 !--> </elementGroup><!-- End 28 !--> <elementGroup><!-- Start: 19 !--> <elementGroup><!-- Start: 19.14 !--> <textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="0" y="0" width="90" height="14" key="textField-59" positionType="Float"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement verticalAlignment="Top"> <font/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA["User Name:"]]></textFieldExpression> </textField> <textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="105" y="0" width="100" height="14" key="textField-60"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement verticalAlignment="Top"> <font/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$P{user_name}]]></textFieldExpression> </textField> </elementGroup><!-- End 19.14 !--> <elementGroup><!-- Start: 19.15 !--> <textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="0" y="14" width="90" height="14" key="textField-61" positionType="Float"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement verticalAlignment="Top"> <font/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA["Account Name:"]]></textFieldExpression> </textField> <textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="105" y="14" width="100" height="14" key="textField-62" positionType="Float"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement verticalAlignment="Top"> <font/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$P{account_name}]]></textFieldExpression> </textField> </elementGroup><!-- End 19.15 !--> </elementGroup><!-- End 19 !--> </band> </title> 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