Jump to content

Can I decode on the report?


ChristFollower

Recommended Posts

  • Replies 9
  • Created
  • Last Reply

Top Posters In This Topic

Therefor you must define a Style where you set your attributes to your needs (red and bold) and set a condition to that style where you make as expression:

 

Code:
new Boolean($F{count}.equals(new Integer(1)) 

 

(assume that your field is of type Integer)

 

then you just have to set this style to your TextField and voilá that's it.

 

have a nice weekend

hth

C-Box

Post edited by: CBox, at: 2006/09/23 12:26

Link to comment
Share on other sites

Thanks C-Box!

 

I can't figure out how/where to put it all together ...

 

I create a Def style - default but no conditions

I create RedBold with Def as parent - conditions "new Boolean($F{numOfTD}.equals("0"))" (it is a string)

 

I have tried to set none or both styles on the field and check/un-check the "Styled text" flag but always use Def or RedBold?

 

What to put where in iRepoprt1.2.6?

Link to comment
Share on other sites

  • 2 weeks later...

CBox I have an issue here

 

I added a condition to the Style so it will change only when a text appears

new Boolean($F{SERVICE}.equals("text"))

 

I've tested it with Strike Through and underline, its ok

But It will not change its color neither change background color

Is there anything special that must be set?

I already changed the style to opaque and still don't work :(

Link to comment
Share on other sites

Which iReport are you using?

 

I remember having the same trouble when I start using ConditionalStyles... it was because the element properties were overwriting the Style properties. I had to remove the Color Attributes from the TextElement (in Textpad pure JRXML edit) to get the Style working.... Teodor and Guilio would think about a solution.... I think it's working since 1.2.5 but not sure.... and because I'm still in (home) vacation - I have my samples all at work... so I will check at wednesday.

 

till then

C-Box

Link to comment
Share on other sites

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...