Jump to content

[iReport 4.0.1] issue with styles


visert

Recommended Posts

hi

i'm using style referenced into a report.

Well... when I put a text field with a style...I don't understand why the font & dimension do not change according with style.

If i put a "label" then work correctly.

 

thank for your help

v

Link to comment
Share on other sites

  • Replies 7
  • Created
  • Last Reply

Top Posters In This Topic

Hi sanda

thank for u response... but the stile is the same for the two object: a label and a textfield.

 

 

<textField pattern="" isBlankWhenNull="false">

<reportElement style="testo" mode="Transparent" x="0" y="0" width="162" height="13" forecolor="#000000" backcolor="#FFFFFF"/>

<textElement textAlignment="Center" verticalAlignment="Top" rotation="None" lineSpacing="Single" markup="none">

<font fontName="SansSerif" size="10" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Helvetica" pdfEncoding="Cp1252" isPdfEmbedded="false"/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA[$F{nome_assessore}]]></textFieldExpression>

</textField>

 

but ... I think that applying style to textfield is not work properly.

I set three VERY different style... and when I select one for a textfield in "design" view does'not change... if apply the same style to another textfield ... I see the change... to another ..no.

 

I don't know if style are overwritten by other setting, but I assume that style have to overwrite ANY configuration... otherwise how can they help us?

 

Thank for u help

bye

 

(copy/paste format does not work...)

Link to comment
Share on other sites

Hi,

That's because inside the <textElement /> element you set element's own font settings (in the <font fontName="SansSerif" size="10" ... /> tag), so all font settings in the 'testo' style are overriden by these font settings.

Hope this helps,

sanda

Link to comment
Share on other sites

  • 3 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...