Jump to content

ireport problem


azmi2

Recommended Posts

i am using ireport 2.5.i make a report for order tracking.i tried to make some condition,but it is not working in ireport,but when i run this parameters in navicat,it is running welll.

 

detail: i have two date fileds 

penalty_start_from and expected _delivery_date  , i put three condition

 

 

Red: if penalty_start_from - expected_delivery_date < 0

Green: if penalty_start_from - expected_delivery_date > 14

Yellow: if   penalty_start_from - expected_delivery_date  > 0 < 14

please tell me how could i display these colors on report one the condition met.

 

thanks for help

 

Code:
Red: if penalty_start_from - expected_delivery_date < 0Green: if penalty_start_from - expected_delivery_date > 14Yellow: if   penalty_start_from - expected_delivery_date  > 0 < 14
Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

I have done something similar in the past. What I did was created a style with different colors based on the calculation results. Created a frame and put all my fields in that frame and then applied that style to the frame.

Here is an example of what I did for one of the style conditions (yellow color).

new Boolean(((new Date().getTime() - $F{PaymentDueDate}.getTime())/86400000) >= 15
&& ((new Date().getTime() - $F{PaymentDueDate}.getTime())/86400000) <= 30)

Note that under the style that you are creating for each color you will have to do a new "style condition".

Hope this helps!

Link to comment
Share on other sites

  • 1 month 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...