Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Either/Or Parameter Field Post Reply Post New Topic
Author Message
duffey01
Newbie
Newbie
Avatar

Joined: 04 May 2009
Location: Australia
Online Status: Offline
Posts: 39
Quote duffey01 Replybullet Topic: Either/Or Parameter Field
     Posted: 18 Jun 2009 at 6:45pm
Hi All
 
I have a report in CRXI with a parameter field 'Warehouse Id'. ?Warehouse Id is on the report and I have Select Expert 'Warehouse Id' 'is equal to' '?Warehouse Id'. End Users want to be able to print for all warehouse id or a particular warehouse. As it stands now, user can only select one warehouse id.
 
Any suggestions??
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 18 Jun 2009 at 11:41pm
You can tell them to enter '0' for all warehouses (or 'All' if it is a string id) and then use a formula similar to this one:

{?Warehouse}={table.warehouseid} OR {?Warehouse}=0

If they enter 0, then all the warehouses are selected.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
duffey01
Newbie
Newbie
Avatar

Joined: 04 May 2009
Location: Australia
Online Status: Offline
Posts: 39
Quote duffey01 Replybullet Posted: 21 Jun 2009 at 9:08pm
Hi Brian
I am having trouble with the formula. Is is expecting a string where the "0" is.
 
I am assuming that I take ?WarehouseId out of select expert and use the formula. Is that right?
 
Thanks for your help
IP IP Logged
duffey01
Newbie
Newbie
Avatar

Joined: 04 May 2009
Location: Australia
Online Status: Offline
Posts: 39
Quote duffey01 Replybullet Posted: 21 Jun 2009 at 10:44pm
Brian, I am such a dope. I have enclosed the 0 with '' and , tah dah!!, perfection.
 
thanks so much
IP IP Logged
duffey01
Newbie
Newbie
Avatar

Joined: 04 May 2009
Location: Australia
Online Status: Offline
Posts: 39
Quote duffey01 Replybullet Posted: 22 Jun 2009 at 5:44pm
Hi Brian
 
Sorry to bother you with this again. I was a bit premature with my 'tah dah'. Other selections I had already set up in 'select expert' are now being ignored. Should this have happened?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 22 Jun 2009 at 8:08pm
you will need to add () around this OR statement and add an AND to include the rest of your select options ...
({?Warehouse}={table.warehouseid} OR {?Warehouse}="0") AND rest goes here


Edited by DBlank - 22 Jun 2009 at 8:08pm
IP IP Logged
duffey01
Newbie
Newbie
Avatar

Joined: 04 May 2009
Location: Australia
Online Status: Offline
Posts: 39
Quote duffey01 Replybullet Posted: 22 Jun 2009 at 8:42pm

Thankyou very much for your help and patience. It all looks great now. I will have to try to have a bit more of a think before posting.

Thanks again
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