IIF expression

Meeting place for R&R customers and clients to share tips and ideas. Post your questions, messages or problems here.
Post Reply
David_Prince_(Guest)
Posts: 8
Joined: Tue Oct 10, 2017 12:44 pm

IIF expression

Post by David_Prince_(Guest) » Mon May 22, 2006 5:08 pm

I have recently started using R&R. I was used to using if then else formulas in crystal reports. How would i create an espression in R&R like the following:__if {cng01.cng01_typ} = 100 then "Customer Information" else__if {cng01.cng01_typ} = 200 then "Location Information" else__if {cng01.cng01_typ} = 300 then "Service Information" else__if {cng01.cng01_typ} = 400 then "Pricing Change" else__if {cng01.cng01_typ} = 500 then "Pricing Change" else__"Other"____I would very much appreciate your help.__thanks,

Rick_Johnson_(Guest)
Posts: 35
Joined: Tue Oct 10, 2017 12:44 pm

=> RE: IIF expression

Post by Rick_Johnson_(Guest) » Mon May 22, 2006 9:34 pm

While this can be done by__IIF(cng01.cng01.typ = 100, "Customer Information", __IIF(cng01.cng01.typ = 200, "Location Information",__IIF(cng01.cng01.typ = 300, "Service Information",__IIF(cng01.cng01.typ = 400, "Pricing Change",__IIF(cng01.cng01.typ = 500, "Pricing Change","Other)))))____Having said this, I personally would use the CASE statement. A little easier to construct and does the same thing. No need to keep up with the ")". (:-})____CASE(cng01.cng01.typ, 100, "Customer Information", 200, "Location Information", 300, "Service Information", 400, "Pricing Change", 500, "Pricing Change, "Other")____Either way, not too bad. God Luck. The CASE statement and the IIF are fully documented in the help files. ____note: A parenthesis is replaced by a smiley face in the post.

David_Prince_(Guest)
Posts: 8
Joined: Tue Oct 10, 2017 12:44 pm

==> RE: IIF expression

Post by David_Prince_(Guest) » Tue May 23, 2006 9:14 am

Thanks very much for your help.

Post Reply