Stretch text field with data overflow

2

Hi,

I have 9 text fields, I want to stretch all these text fields with data overflow. In my case, for the text field A I set position type to 'fix relative to the top'  and I checked 'stretch with overflow', for the text fields B, C I set position type to 'float'. But I got bad design, so I want the text fields (left-right) be in the same position (aligned) with the text fields A,B and C.

Thanks in advance.

Best Regards.

Rayen.Drissi's picture
Joined: Jul 2 2015 - 5:38am
Last seen: 1 year 2 months ago

4 Answers:

0

Thank you for your help.

Already the stretch type =>'Relative to Tallest Object'.

I created Frame and group selected elements for each row then the problem is solved.

Here is the result :

Jrxml :

<frame>
            <reportElement uuid="70cb42df-4e8f-4cbc-8d8f-f86a4aef9e3d" positionType="Float" x="119" y="233" width="332" height="20" isPrintWhenDetailOverflows="true"/>
        </frame>
        <frame>
            <reportElement uuid="4ca6a014-3eca-4c16-ae4e-079216b1e010" positionType="Float" x="119" y="253" width="332" height="20" isPrintWhenDetailOverflows="true"/>
        </frame>
        <elementGroup>
            <textField isStretchWithOverflow="true">
                <reportElement uuid="b6102d47-3114-4673-a241-4dddb0e556bd" style="table" positionType="Float" stretchType="RelativeToTallestObject" x="133" y="213" width="100" height="20"/>
                <textElement textAlignment="Center" verticalAlignment="Middle"/>
                <textFieldExpression><![CDATA["1"]]></textFieldExpression>
            </textField>
            <textField isStretchWithOverflow="true">
                <reportElement uuid="c22b46b5-e528-4bb5-ad1c-a5fca06faf38" style="table" positionType="Float" stretchType="RelativeToTallestObject" x="383" y="213" width="55" height="20"/>
                <textElement textAlignment="Center" verticalAlignment="Middle"/>
                <textFieldExpression><![CDATA["value 1"]]></textFieldExpression>
            </textField>
            <textField isStretchWithOverflow="true">
                <reportElement uuid="66833d4b-1a6b-4398-9431-ed3ef80ef7dc" style="table" positionType="Float" stretchType="RelativeToTallestObject" x="233" y="213" width="150" height="20"/>
                <textElement textAlignment="Center" verticalAlignment="Middle"/>
                <textFieldExpression><![CDATA["azertyuiop aaaaaaaaaaaaaaazeeeeeeerrrrrrrrrrrrtttttttttttttttttttttpmmmmmmmmmmmmmlk"]]></textFieldExpression>
            </textField>
        </elementGroup>
        <frame>
            <reportElement uuid="bc738f1d-150b-4959-9bc5-6a00b7112969" positionType="Float" x="119" y="213" width="332" height="20" isPrintWhenDetailOverflows="true"/>
        </frame>
        <elementGroup>
            <textField isStretchWithOverflow="true">
                <reportElement uuid="78d019fd-5e89-47f1-a895-9a4f0f754000" style="table" positionType="Float" stretchType="RelativeToTallestObject" x="133" y="233" width="100" height="20"/>
                <textElement textAlignment="Center" verticalAlignment="Middle"/>
                <textFieldExpression><![CDATA["2"]]></textFieldExpression>
            </textField>
            <textField isStretchWithOverflow="true">
                <reportElement uuid="5935ad61-77ec-4b05-84bf-6f72d3dcd0bd" style="table" positionType="Float" stretchType="RelativeToTallestObject" x="233" y="233" width="150" height="20"/>
                <textElement textAlignment="Center" verticalAlignment="Middle"/>
                <textFieldExpression><![CDATA["DP-GI"]]></textFieldExpression>
            </textField>
            <textField isStretchWithOverflow="true">
                <reportElement uuid="83d4865c-f1af-4361-b6fd-9575a9835c7f" style="table" positionType="Float" stretchType="RelativeToTallestObject" x="383" y="233" width="55" height="20"/>
                <textElement textAlignment="Center" verticalAlignment="Middle"/>
                <textFieldExpression><![CDATA["value 2"]]></textFieldExpression>
            </textField>
        </elementGroup>
        <elementGroup>
            <textField isStretchWithOverflow="true">
                <reportElement uuid="1a2694c6-974b-493a-b0a6-09b2be10f63a" style="table" positionType="Float" stretchType="RelativeToTallestObject" x="133" y="253" width="100" height="20"/>
                <textElement textAlignment="Center" verticalAlignment="Middle"/>
                <textFieldExpression><![CDATA["3"]]></textFieldExpression>
            </textField>
            <textField isStretchWithOverflow="true">
                <reportElement uuid="450e7cce-5a49-4bbc-b502-d86352c7c873" style="table" positionType="Float" stretchType="RelativeToTallestObject" x="233" y="253" width="150" height="20"/>
                <textElement textAlignment="Center" verticalAlignment="Middle"/>
                <textFieldExpression><![CDATA["AS-GE"]]></textFieldExpression>
            </textField>
            <textField isStretchWithOverflow="true">
                <reportElement uuid="d8e7b402-0081-46ca-bd1c-2c3ae992b957" style="table" positionType="Float" stretchType="RelativeToTallestObject" x="383" y="253" width="55" height="20"/>
                <textElement textAlignment="Center" verticalAlignment="Middle"/>
                <textFieldExpression><![CDATA["value 3"]]></textFieldExpression>
            </textField>
        </elementGroup>

Best Regards.

Rayen.Drissi's picture
Joined: Jul 2 2015 - 5:38am
Last seen: 1 year 2 months ago
1

HI,

Put each row in frames so that if any of the field above the text fields expands then the entire second row gets shifted. This makes your design as per the requirement.

Just to explain, your top 3 fields will be in frame 1, middle fields will be in frame 2 and bottom fields will be in frame 3.

Regards,

Ashwath

abc.hegde's picture
166
Joined: Apr 1 2015 - 4:02am
Last seen: 2 weeks 1 day ago
0

Hi,

Thank you for your post.

I set position type of all text fields to 'float' and checked  'stretch with overflow'.

I got this result :

 

Best Regards.

Rayen.Drissi's picture
Joined: Jul 2 2015 - 5:38am
Last seen: 1 year 2 months ago
2

Hey,,,,,,,,

Set

Postion Type-- Float And Stretch Type --Relative to Tallest Object 

In all field ,,,,,,,,

and tick Stretch With Overflow ....in every field,,,,,

thats working properly,,,,,,,

Tarun Gupta's picture
Joined: Jun 17 2015 - 4:11am
Last seen: 3 years 5 months ago
Feedback