How to use case statement in calculated fields in domain designer of jasper server?

I need to use case statement in calculated fields while creating the domain using domain designer of jasper server. It would be helpful if i get any suggestion..

raja.shekar's picture
Joined: Apr 21 2014 - 12:28am
Last seen: 8 years 2 weeks ago

2 Answers:

JRS does support "if" in calculated field, but doesnt support case. HTH.



nthapa's picture
Joined: Jan 24 2014 - 9:53am
Last seen: 6 years 8 months ago

If you really need a SQL CASE statement, you can implement it as part of the SQL Query in a Derived Table.

djohnson53's picture
Joined: May 25 2012 - 11:10am
Last seen: 1 year 1 day ago

Hi all,
Thanks for the reply.
I need to use if statement in calculated fields of domain designer.for single condition it's working.
if(a='10',a,b) its working.
However i need to check b also. Example if(a='10' or b='15,a,b) it's not working.
Please help me on this.

raja.shekar - 8 years 1 month ago


Calc Field Z: a='10'
Calc Field X: b='15'
Calc Field Y: if(Z or X,a,b)

djohnson53 - 8 years 1 month ago