Then, supply multiple Case clauses, each testing the value of the Select expression (make sure the value you supply to each Case clause is the same data type as the Select expression). Begin with the word Select followed by a database field, formula, or other expression. You may choose Select Case from the Control Structure category of the Formula Editor Operator Tree or simply by typing the correct syntax.
These functions enable Crystal Reports formulas to move closer and closer to a full procedural language, such as Visual Basic. Crystal Reports logic functions such as Select Case, For loops, and Do loops make these tasks much easier. For example, it can be tedious to write long repetitive If-Then-Else formulas to perform tasks such as testing for more than a small number of conditions, picking apart strings, or cycling through multiple-value parameter fields or other arrays. The term logic construct refers to the features of the Crystal Reports formula language that enable you to go beyond basic If-Then-Else logic. Even if you re not a programmer, you ll probably soon find that these features come in handy in the more advanced reporting situations you ll encounter. If you fall into this category (perhaps you are a Basic programmer), not only will the typical procedural constructs in Basic syntax open up enhanced flexibility for you, but similar logic constructs in Crystal syntax will also make your reporting life easier. Many advanced users (particularly those with programming backgrounds) will often find some of the procedural capabilities of high-level computer languages useful when designing reports.