Stephane Grenier
Stephane Grenier

Reputation: 15925

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

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?

Upvotes: 0

Views: 436

Answers (3)

Stephane Grenier
Stephane Grenier

Reputation: 15925

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

Upvotes: 1

Karthikeyan Arumugam
Karthikeyan Arumugam

Reputation: 330

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

Upvotes: 0

Jim
Jim

Reputation: 1161

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

Upvotes: 0

Related Questions