JFreeReport trying to dynamically set height of line item with a border around it

422 views Asked by At

Using the JFreeReport classic engine, I have:

<items height="10" fontname="SansSerif" fontstyle="plain" fontsize="8">
    <rectangle x="0" y="0" width="100%" height="10" dynamic="true" color="#CCCCCC" fill="false" draw="true" />
    <string-field x="2" y="0" width="100%" height="10" dynamic="true" fieldname="Workorder #"/>
</items>

Basically for the rectangle line, whether or not I put dynamic the height of the rectangle is 10 (the border around the text). So how can I make the rectangle the same height as the string-field?

3

There are 3 answers

0
Stephane Grenier On BEST ANSWER

It is not possible to dynamically set the height of a line item with a border around it.

1
Karthikeyan Arumugam On

if you remove the attribute height="10" from the Rectangle, you will get what you are expecting.

1
Jim On

I hate to ask the obvious, have you tried height="100%" instead of height="10"?