0

Im making a report using JasperReports and iReport, and since im not using a table, what i'm doing now to give it some sort of table like border, is giving the left and right border of each textfield a dotted style.

But, i won't always have the same data in each box, and this is causing the borders to be of different height.

I also would like for the borders to meet each other, but no matter what i change or move, there's always a space in between each box.

But for now, the most important thing is for each box to have the same height.

This is a picture of my report:

enter image description here

This is what each box looks like, they're all similar so i just pasted one the xml of one box:

<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true">
            <reportElement key="textField-1" mode="Transparent" x="7" y="0" width="177" height="0" isRemoveLineWhenBlank="true" forecolor="#000000" backcolor="#FFFFFF">
                <printWhenExpression><![CDATA[$F{RESULTMICRO1}!=null]]></printWhenExpression>
            </reportElement>
            <box leftPadding="1">
                <pen lineWidth="0.0"/>
                <topPen lineWidth="0.5" lineStyle="Dashed"/>
                <leftPen lineWidth="0.5" lineStyle="Dashed"/>
                <bottomPen lineWidth="0.5" lineStyle="Dashed"/>
                <rightPen lineWidth="0.5" lineStyle="Dashed"/>
            </box>
            <textElement textAlignment="Left" verticalAlignment="Top" rotation="None">
                <font fontName="Courier New" size="9" isBold="false" isItalic="true" isUnderline="false" isStrikeThrough="false" pdfFontName="Courier-Bold" pdfEncoding="Cp1252" isPdfEmbedded="true"/>
                <paragraph lineSpacing="Single"/>
            </textElement>
            <textFieldExpression><![CDATA[$F{RESULTMICRO1}]]></textFieldExpression>

If anyone could help me, i'd appreciate it.

Alex K
  • 22,315
  • 19
  • 108
  • 236
le0nicolas
  • 83
  • 10
  • You can play with the frame element (just to use right border of it or put the line) – Alex K Sep 22 '21 at 18:53
  • i figured out how to make the boxes the same using, i grouped the textfields together in a group element, and used the stretchType="RelativeToTallestObject" property on each reportelement. But now i still have to make ther borders meet each other, if anyone knows how to do that i would appreciate it – le0nicolas Sep 22 '21 at 18:54
  • `the most important thing is for each box to have the same height.` - [How to make all rows in table component stretch to be of same height?](https://stackoverflow.com/q/54715761/876298). Or you can use the constant height (deny stretching) – Alex K Sep 22 '21 at 18:55
  • @AlexK yep, saw that, but its not what i need. Either way, i've solved it by using groupelement and stretch property on each box. But now i want the boxes to not have any spaces between them, idk how to do that – le0nicolas Sep 22 '21 at 18:59

0 Answers0