0

I use Jasper Reports to generate RTF file.

In RTF each textField is represented as separate box: enter image description here

I tried to use one frame for textFields:

<frame>
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="220" y="45" width="406" height="75"/>
<textField>
    <reportElement positionType="Float" x="0" y="0" width="406" height="60"/>
    <textElement>
        <font fontName="Arial" size="8"/>
    </textElement>
    <textFieldExpression><![CDATA["Address:"]]></textFieldExpression>
</textField>
<textField hyperlinkType="Reference" hyperlinkTarget="Blank">
    <reportElement x="0" y="57" width="200" height="15" key="textWithStyle" style="LinkField"/>
    <textElement>
        <font fontName="Arial" size="8" isUnderline="true"/>
    </textElement>
    <textFieldExpression><![CDATA["here"]]></textFieldExpression>
    <hyperlinkReferenceExpression><![CDATA["http:adress"]]></hyperlinkReferenceExpression>
</textField>
</frame>

But textFields also in the different boxes.

Is it possible to combine several textFields into one box like the following?

enter image description here

I know that I can add each text to one textField, but sometimes I need two separate textFields that I can manage inside one box.

RuF
  • 548
  • 1
  • 11
  • 31
  • `Is it possible to combine several textFields into one box like the following?` - What does it mean? How to add common border or what? For adding border you can use frame, for example – Alex K Apr 23 '19 at 18:29
  • @AlexK I updated my question. Common frame is not working. "How to add common border?" - Yes, that's my question – RuF Apr 24 '19 at 09:02
  • `But textFields also in the different boxes.` - What do you mean? I don't understand problem - what is box?. `Is it possible to combine several textFields into one box like the following?` - Yes, with help of frame – Alex K Apr 24 '19 at 17:57
  • @AlexK Saying _boxes_ I mean ractangle around the text. This rectange allows to move internal text all together. Thare are two rectangles in the first picture and one rectange for two *textField*s in the second one. I need the second case. How shoul I configure *frame* to two *textField*s will be inside one rectange? The source code with the *frame* that I added do not do one rectangle for two *textField*s. – RuF Apr 25 '19 at 07:49
  • Here you can find a sample of how to use frame and how to draw borders: [How to draw a border around both the column header, footer and detail sections?](https://stackoverflow.com/q/7193235/876298) – Alex K Apr 25 '19 at 18:12

0 Answers0