找到你要的答案

Q:Stretch text field with data overflow

Q:带数据溢出的拉伸文本字段

I have 9 text fields, I want to stretch all these text fields with data overflow. In my case, for all text fields I set position type to 'float' and I checked 'stretch with overflow'. And I put each row in Frame.

But I got a bad design, so I want to align the text fields relating to values 2 and 3 with the others texts fields. Example : enter link description here

Thanks in advance.

Best Regards.

我有9个文本字段,我想用数据溢出来扩展所有这些文本字段。在我的例子中,对于所有文本字段,我设置位置类型为“浮动”,我检查了“带溢出的拉伸”。我把每一行的框架。

But I got a bad design, so I want to align the text fields relating to values 2 and 3 with the others texts fields. Example : enter link description here

先谢谢了。

诚挚的问候。

answer1: 回答1:

You cannot have an option to adjust the position of the text based on the fields in Left and Right. Also from your design, I can imagine that the Left and Right text boxes are inside List component or Table component.

Position of text boxes inside List or Table component cannot be adjusted based on the position of text boxes which are not inside the table or list component.

Posting a proper design or sample JRXML might be helpful to solve your problem.

您不能有一个选项,根据左边和右边的字段来调整文本的位置。也从您的设计,我可以想象,左,右文本框内的列表组件或表组件。

列表框或表组件中的文本框的位置不能根据表框或列表组件中的文本框的位置进行调整。

发布一个适当的设计或样品JRXML可能有助于解决你的问题。

answer2: 回答2:

Problem is solved : I created Frame and group selected elements for each row.

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

Here is the result : enter link description here

Best Regards.

Problem is solved : I created Frame and group selected elements for each row.

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

这里是结果:在这里输入链接描述

诚挚的问候。

jasper-reports