Solved

Crystal reports IF <VALUE> IN <LIST OF VALUES> THEN DO SOMETHING

Posted on 2009-07-13
3
2,259 Views
Last Modified: 2012-08-14
I just need the exact code to specify the following (in a sort-of pseudocode)

if DBfield is in ("ABC", "XYZ","RST") then     <-- This is the problem
  do something
else
  do something else

I can't find how to specify the IN.  IN RANGE doesn't work.  I saw it somewhere else where it had IN and then there was another keyword after the list of values and before the THEN, but I can't find it.  Help!
0
Comment
Question by:bshelby777
3 Comments
 
LVL 17

Accepted Solution

by:
pssandhu earned 450 total points
ID: 24841951
Something like this (you have to put the values in a square bracket):
IF DBFiled IN ["ABC","XYZ"] Then "This is the Problem"
ELSE "This is okay"
Hope this helps.
P.
0
 
LVL 100

Assisted Solution

by:mlmcc
mlmcc earned 50 total points
ID: 24856171
Looks good.

WHat you might have seen was the BASIC syntax

IF DBFiled IN ARRAY ["ABC","XYZ"] Then
    "This is the Problem"
ELSE
    "This is okay"

mlmcc

0
 

Author Closing Comment

by:bshelby777
ID: 31602921
I gave pssandhu 450 points because that was the first correct answer.  I gave 50 to mlmcc because that may be what I saw before and it's good to know that it's equivalent.  Thank you both very much.
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question