Jump to content
Changes to the Jaspersoft community edition download ×

Stretch text field with data overflow


Rayen.Drissi
Go to solution Solved by Rayen.Drissi,

Recommended Posts

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.

overflow.PNG.a29f966145fd9930cde22d244e5f5c58.PNG

Thanks in advance.

Best Regards.

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

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

Link to comment
Share on other sites

  • Solution

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 :

result(1).PNG.0f9ea3032bb12d4460434c8114b0239b.PNG

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.

Link to comment
Share on other sites

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