Print Page | Close Window

Case within case

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=21018
Printed Date: 28 Apr 2024 at 6:17am


Topic: Case within case
Posted By: Macavity
Subject: Case within case
Date Posted: 09 Sep 2014 at 4:28am
Anyone worked with case within case ? My data doesn't seem to be correct.

example

select {table.dim}

case "300" : select {table.bpid} case "S0001" : "A0001"
                     default : if {table.ctyy} = "DE" then "Z" else "A0002"

case "600" : select {table.bpid} case "S501" : "B0001"
                     default : if {table.ctyy} = "DE" then "Z" else "B0002"

default : "Z"

no syntax errors, anyone see any logical errors or things that might go wrong ?

thanks



Replies:
Posted By: lockwelle
Date Posted: 17 Sep 2014 at 5:17am
never done it with that syntax. I've used SWITCH, and help has the syntax for SELECT CASE (in the basic syntax) as being a different syntax.

in VB i have done embedded Select Cases without any issue.



Print Page | Close Window