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

Vertically growing TextField in Multi Column SubReport


gowthamfox_1

Recommended Posts

Hello All,

I'm using iReport 5.6.0

I have a 6 column  subreport which has a TextField in it. The printOrder is Horizontal

The Variable ResVal computes the data and spits out to the textField.

The Issue is when the Data is longer than the lenght of the textfield it gets truncared. I have the following properties set for the TextField.

isStretchWithOverflow="true"

positionType="Float"

stretchType="RelativeToTallestObject"

How do I fix this or is there a workaround.

Please assist. Thanks.

The sample report is attached for your reference below.

 

<?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="report1" columnCount="6" printOrder="Horizontal" pageWidth="595" pageHeight="38" columnWidth="99" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="45650691-a891-4701-9594-6bbc49e2bc34">
    <property name="ireport.zoom" value="1.0"/>
    <property name="ireport.x" value="0"/>
    <property name="ireport.y" value="0"/>
    <queryString>
        <![CDATA[select 1]]>
    </queryString>
    <variable name="ResVal" class="java.lang.String">
        <variableExpression><![CDATA["Lorem Ipsum 1 Lorem Ipsum 2 Lorem Ipsum 3 Lorem Ipsum 4 Lorem Ipsum 5 Lorem Ipsum 6 Lorem Ipsum 7 Lorem Ipsum 8 Lorem Ipsum 9"]]></variableExpression>
    </variable>
    <detail>
        <band height="22">
            <textField isStretchWithOverflow="true" isBlankWhenNull="true">
                <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="0" y="0" width="96" height="21" uuid="dee2a441-d00f-46f9-83ab-409bce1d02fd"/>
                <textElement verticalAlignment="Top"/>
                <textFieldExpression><![CDATA[$V{ResVal}]]></textFieldExpression>
            </textField>
        </band>
    </detail>
</jasperReport>
 

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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