Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: possible syntax error - please help Post Reply Post New Topic
Author Message
goodpasture
Newbie
Newbie
Avatar

Joined: 21 May 2009
Location: United States
Online Status: Offline
Posts: 8
Quote goodpasture Replybullet Topic: possible syntax error - please help
     Posted: 21 May 2009 at 9:36am
I have a graphic suppression formula...

{fdb_medication.dea_id}<> '0' or {patient_medication.dispense_as_writtn_ind}='Y' or {active_stations.user_id}<> 104

and this works great but say I want to add other user_id's to the formula...

{fdb_medication.dea_id}<> '0' or {patient_medication.dispense_as_writtn_ind}='Y' or ({active_stations.user_id}<> 104 or {active_stations.user_id}<> 105)

I actually need to add about 20 to this but I keep getting errors after adding more than one.

Can anyone please help?

thanks,
Jonathan
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 21 May 2009 at 10:07am
or {active_stations.user_id} in [104,105,xxx,xxx,...]
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 21 May 2009 at 10:08am
or if it is a range that includes every item from 104 to say 124 (or whatever #):
or {active_stations.user_id} in 104 to 124

Edited by DBlank - 21 May 2009 at 10:09am
IP IP Logged
goodpasture
Newbie
Newbie
Avatar

Joined: 21 May 2009
Location: United States
Online Status: Offline
Posts: 8
Quote goodpasture Replybullet Posted: 21 May 2009 at 10:27am
Thanks everyone ... now should it be "in [xx,xx]"

or is it "<> in [xx,xx]" ?

thanks,

Jonathan
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 21 May 2009 at 12:11pm
Sorry, did not see the < > part of your original post and was writing it to include rather than exclude...
I believe this should work:
{fdb_medication.dea_id}<> '0' or {patient_medication.dispense_as_writtn_ind}='Y' or ({active_stations.user_id} in [104,105,xxx,xxx,...] )=false
IP IP Logged
goodpasture
Newbie
Newbie
Avatar

Joined: 21 May 2009
Location: United States
Online Status: Offline
Posts: 8
Quote goodpasture Replybullet Posted: 21 May 2009 at 1:52pm
Thank you very much.
IP IP Logged
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