Jump to content

Comparing variables against query result


A3an

Recommended Posts

Hi guys

I want to compare variables against query results. Lets say my query result 'seat_code' outputs A3, A4 as taken seats
so A1 and A2 are still free. (not in query result) I want to use conditional formating to set the background color of seat A3 and A4 to red.
The free seats have a white background color.
Think about an airplane floor plan seats availability. It is important to show more then 1 seat per row. Like first row on an airplane | A1 | A2 | 'isle' | A3 | A4 |
Conditional formating is executed when true. So if V{A3}==$F{seat_code} => Background color returns red.

Please advice how to fix this.

Greets A3an.


Hi all

I think I was not clear enough to what I want achieve.
Understanding conditional formatting is not the problem.
My query result gives me only the seats that are taken and I want to visualize them in red. The other (free) seats are for example green.
The thing is that I don't know how to compare the result set against every seat. Like: IF $V in result set is true apply conditional formatting.
I now the in_array() function in PHP but how to do this in Jaspersoft? Don't now much about Java....

I cannot put the seats in detail band because my result set will mulitply this by the number of rows of the result set. 
So what's the best solution to visualize seats? Should I use a textfield, table or maybe an image? I think a textfield will have the shortest executoin time.
I don't want to use a table because the seats are not always aligned this way.

Greets A3an

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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