Solved

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

Posted on 2009-07-13
3
3,037 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 101

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
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…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

691 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