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

anjumprevaiz

Recommended Posts

  • Replies 10
  • Created
  • Last Reply

Top Posters In This Topic

Hiii

As per my knowledge we cannot use if else in ireport.

But you can achive the same result by using formulas

( <condition> ? exp1 : exp2 )

it is equalent  to

if(condion)

{

exp1

}

else

{

exp2

}

Further questions pls feel free to contact .Next time give with example.

Thanks

jim

 

Link to comment
Share on other sites

  • 4 months later...
  • 3 months later...
  • 1 year later...
  • 3 weeks later...

How to use if else in Jasper Report?

Many times we have some parameter whose value we calculate based on other.

I stuck on problem

ae i had two parameter P_BID_STATUS_FLAG and P_BID_STATUS_FLAG

if  P_BID_STATUS_FLAG='W'

P_BID_STATUS_FLAG="wait"

else if  P_BID_STATUS_FLAG='R'

P_BID_STATUS_FLAG="run"

now converting it into jasper

Code:


Post Edited by vsemwal at 05/24/2011 12:19
Link to comment
Share on other sites

"i had two parameter P_BID_STATUS_FLAG and P_BID_STATUS_FLAG"

Do you have 2 parameters by same name? We can't have 2 parameters by same name(atleast not in the latest version 4.0.2).

The expression seems fine though. By the way, what is your actual problem?

Link to comment
Share on other sites

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