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

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">
        <conditionalStyle>
            <conditionExpression><![CDATA[new Boolean($V{countNumber}.intValue() % 1 == 0)]]></conditionExpression>
            <style fontSize="18" isBold="true"/>
        </conditionalStyle>
    </style>

<columnHeader>
        <band height="37" splitType="Stretch">
            <staticText>
                <reportElement style="alternateStyle" x="0" y="0" width="136" height="33"/>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font  isBold="true"/>
                </textElement>
                <text><![CDATA[Name]]></text>
            </staticText>
            <staticText>
                <reportElement style="alternateStyle" x="414" y="0" width="121" height="33"/>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font  isBold="true"/>
                </textElement>
                <text><![CDATA[Country]]></text>
            </staticText>
        </band>
    </columnHeader>

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: 5 years 6 months ago

1 Answer:

0

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.

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

sanbez's picture
834
Joined: Jan 11 2011 - 2:06am
Last seen: 3 months 11 hours ago
Feedback
randomness