Jump to content
We've recently updated our Privacy Statement, available here ×

Recommended Posts

In an effort to make this more clear: I'm trying to automate having a different field to trigger a condition in the current field, but the field names are related.  In generic code, I would just do this:

if fieldname_Changed ==1 then fieldname background = yellow.

 

I have 100+ textfields I'm displaying in my report.  Each of these have a change flag associated with them which are also brought in as indiviual fields in the query.  Using the flags that the data had been changed I want to highlight the value in the textfield. 

I know this can be done with conditional styles and know how to do that on an individual field basis.  But I don't want to create 100+ styles.

Is there some way to tell the system to use the current expression to check another field?

Or is there a way to create a variable for the condition to check the field name, and based on that use the field's flag to set the conditional expression?

 

Basically I want a style's conditional expression something like this where $F{} is the current field's name.  I tack on " Changed" to the end to make my flag's name and if that flag is equal to one then the style highlights.  But I don't know what to put instead of $F{}.

$F{CONCATENATE($F{}," Changed")}==1

 

So if the field I want to use the style on is $F{CUSTOMER} the expression would become $F{CUSTOMER Changed}==1.  Then on the next field that uses the same style would be $F{ADDRESS} the expression would become $F{ADDRESS Changed} == 1 and so on times 100.

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

As helpful as that might be to others, it is not to my application, as I'm trying to recreate forms, not plot graphs, and my company is committed to Jaspersoft, so it would not be my call to make to change.  Nor, through looking quickly at ggplot, do I see how it applies to my initial question.

Link to comment
Share on other sites

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