1

My problem is similar to this Link.

I am not able to align my text field, my alignment should be like this:

My alignment should be like this

but what I am getting is:

But what i am getting is

I followed all the steps from this Question. Even though I am not able to align how I want.

Please help me align. My code is

<detail>
    <band height="110" splitType="Stretch">
        <elementGroup>
            <frame>
                <reportElement uuid="d7ff451a-1dc8-496b-87e2-cecc4341bc77" stretchType="RelativeToTallestObject" x="1" y="22" width="110" height="20" isPrintWhenDetailOverflows="true"/>
                <box>
                    <topPen lineWidth="1.0"/>
                    <leftPen lineWidth="1.0"/>
                    <rightPen lineWidth="1.0"/>
                </box>
                <textField isStretchWithOverflow="true" isBlankWhenNull="true">
                    <reportElement uuid="cf64a3a6-f9e1-4eea-9d2e-70c5439dc8fe" stretchType="RelativeToTallestObject" mode="Transparent" x="0" y="0" width="110" height="20" isPrintWhenDetailOverflows="true" backcolor="#FFFFFF"/>
                    <box>
                        <topPen lineWidth="0.0"/>
                        <leftPen lineWidth="0.0"/>
                        <bottomPen lineWidth="0.0"/>
                        <rightPen lineWidth="0.0"/>
                    </box>
                    <textElement textAlignment="Center" verticalAlignment="Middle">
                        <font fontName="Arial" size="8" isBold="false"/>
                    </textElement>
                    <textFieldExpression><![CDATA[$F{LOCATIONS}]]></textFieldExpression>
                </textField>
            </frame>
        </elementGroup>
        <elementGroup>
            <frame>
                <reportElement uuid="afb0837c-f946-4179-bf3c-693fbc45dbd3" stretchType="RelativeToTallestObject" x="1" y="61" width="110" height="20" isPrintWhenDetailOverflows="true"/>
                <box>
                    <topPen lineWidth="1.0"/>
                    <leftPen lineWidth="1.0"/>
                    <bottomPen lineWidth="1.0"/>
                    <rightPen lineWidth="1.0"/>
                </box>
                <textField isStretchWithOverflow="true" isBlankWhenNull="true">
                    <reportElement uuid="55d2d140-0934-4f44-83c7-c19b3961570b" stretchType="RelativeToTallestObject" mode="Transparent" x="0" y="0" width="110" height="20" isPrintWhenDetailOverflows="true" backcolor="#FFFFFF"/>
                    <box>
                        <topPen lineWidth="0.0"/>
                        <leftPen lineWidth="0.0"/>
                        <bottomPen lineWidth="0.0"/>
                        <rightPen lineWidth="0.0"/>
                    </box>
                    <textElement textAlignment="Center" verticalAlignment="Middle">
                        <font fontName="Arial" size="8" isBold="false"/>
                    </textElement>
                    <textFieldExpression><![CDATA["564"]]></textFieldExpression>
                </textField>
            </frame>
        </elementGroup>
        <elementGroup>
            <frame>
                <reportElement uuid="5af1e133-0292-418c-89a7-10564621fe88" stretchType="RelativeToTallestObject" x="1" y="41" width="110" height="20" isPrintWhenDetailOverflows="true"/>
                <box>
                    <topPen lineWidth="1.0"/>
                    <leftPen lineWidth="1.0"/>
                    <rightPen lineWidth="1.0"/>
                </box>
                <textField isStretchWithOverflow="true" isBlankWhenNull="true">
                    <reportElement uuid="8060fb2c-ad82-4121-ba48-921c76f0dbdf" stretchType="RelativeToTallestObject" mode="Transparent" x="0" y="0" width="110" height="20" isPrintWhenDetailOverflows="true" backcolor="#FFFFFF"/>
                    <box>
                        <topPen lineWidth="0.0"/>
                        <leftPen lineWidth="0.0"/>
                        <bottomPen lineWidth="0.0"/>
                        <rightPen lineWidth="0.0"/>
                    </box>
                    <textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
                        <font fontName="Arial" size="9" isBold="true" pdfFontName="Helvetica-Bold"/>
                    </textElement>
                    <textFieldExpression><![CDATA["MARKS"]]></textFieldExpression>
                </textField>
            </frame>
        </elementGroup>
        <elementGroup>
            <frame>
                <reportElement uuid="066dcbde-5475-4f9a-a8fb-643ac832db38" stretchType="RelativeToTallestObject" x="1" y="2" width="110" height="20" isPrintWhenDetailOverflows="true"/>
                <box>
                    <topPen lineWidth="1.0"/>
                    <leftPen lineWidth="1.0"/>
                    <rightPen lineWidth="1.0"/>
                </box>
                <textField isStretchWithOverflow="true" isBlankWhenNull="true">
                    <reportElement uuid="a659aae9-f012-4cc6-a821-42f6dcf184d1" stretchType="RelativeToTallestObject" mode="Transparent" x="0" y="0" width="110" height="20" isPrintWhenDetailOverflows="true" backcolor="#FFFFFF"/>
                    <box>
                        <topPen lineWidth="0.0"/>
                        <leftPen lineWidth="0.0"/>
                        <bottomPen lineWidth="0.0"/>
                        <rightPen lineWidth="0.0"/>
                    </box>
                    <textElement textAlignment="Center" verticalAlignment="Middle">
                        <font fontName="Arial" size="9" isBold="true"/>
                    </textElement>
                    <textFieldExpression><![CDATA["NAME"]]></textFieldExpression>
                </textField>
            </frame>
        </elementGroup>
    </band>
</detail>
Community
  • 1
  • 1
QQQ
  • 59
  • 8
  • Remove the `transparent` flag on the MARKS field. If you want to be able to see all infos, add `Postition Type Float` to the field with 564. – tobi6 Jun 20 '16 at 09:52
  • Hi Alex, thanks for ur reply. I removed the transparent flag on the MARKS field and i have set Postition Type Float to the field with 564. But still i m facing the same problem. Please suggest me any other ways. – QQQ Jun 20 '16 at 12:05
  • Alex? :) Set MARKS field and 564 field to Float. Also try setting the order in the "Outline" like the order of elements in the report. – tobi6 Jun 20 '16 at 14:16

0 Answers0