Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: "in" and "not in" formula Post Reply Post New Topic
Author Message
bluelake
Newbie
Newbie
Avatar

Joined: 08 Jul 2010
Online Status: Offline
Posts: 24
Quote bluelake Replybullet Topic: "in" and "not in" formula
    Posted: 04 May 2012 at 7:24am
I have three multi-select dictionary fields and I want to create a numeric so that I can sum the responses.  This isn't returning any value:

if "10" in {field A}
then 1

else if "10" in {field A}
and  "10" in {field B}
then 0

else if "10" in {field C}
then 1

else 0
IP IP Logged
amanda5615
Newbie
Newbie


Joined: 20 Apr 2012
Location: United States
Online Status: Offline
Posts: 17
Quote amanda5615 Replybullet Posted: 04 May 2012 at 8:00am
Try this:
if {field} like "*10*" then 1 else if {field} like "*10*" and if {field2} like "*10*" then 0 else if {field3} like "*10*" then 1 else 0
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 04 May 2012 at 10:03am
just a logic note...you probably want to check the condition in field a & b first, then field a, then field c.
 
currently, if the value is in field a & b, you will get a 1, and not the 0 that you were expecting.
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.018 seconds.