How to change Font size is dynamically or parameterized in jrxml(Ireport-4.5.0).

Hi ,


Please help me how to change font size parameterized  in jrxml reports.


I have finshed report using jrxml(iReport-4.5.0) but requirement is fileds and static text font size are change dynamically or parameterized.


i hava also tried conditional styles in my jrxml  like below

<style name="alternateStyle" forecolor="#FF0000" fontName="Arial">
            <conditionExpression><![CDATA[new Boolean($V{countNumber}.intValue() % 1 == 0)]]></conditionExpression>
            <style fontSize="18" isBold="true"/>

        <band height="37" splitType="Stretch">
                <reportElement style="alternateStyle" x="0" y="0" width="136" height="33"/>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font  isBold="true"/>
                <reportElement style="alternateStyle" x="414" y="0" width="121" height="33"/>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font  isBold="true"/>

It is also not used to change font size. pleae help regarding this as soon as posible

ganeshforurs's picture
Joined: Sep 27 2013 - 12:28am
Last seen: 8 years 8 months ago

1 Answer:

In ireport select static text "Ganesh" and in Property Window (Ctrl+Shift+7) set Height=21 (or more then21). fontSize="18" does not fit in height=14 for this label.

new Boolean($V{countNumber}.intValue() % 1 == 0   is always TRUE :D

sanbez's picture
Joined: Jan 11 2011 - 2:06am
Last seen: 1 year 7 months ago