JFreeReport tratando de establecer dinámicamente la altura del elemento de línea con un borde alrededor

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?

preguntado el 10 de marzo de 12 a las 16:03

3 Respuestas

No es posible to dynamically set the height of a line item with a border around it.

respondido 26 nov., 12:06

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

respondido 19 mar '12, 21:03

You can't do that because the rectangle will then take 100% of the height of the page. - Stephane Grenier

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

Respondido 21 Jul 12, 22:07

Removing the height="10" attributes only causes the rectangle to disappear. It doesn't adjust the height dynamically. - Stephane Grenier

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.