Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: This parameter or that parameter option? Post Reply Post New Topic
Author Message
Slurm
Newbie
Newbie
Avatar

Joined: 07 Nov 2007
Location: United States
Online Status: Offline
Posts: 8
Quote Slurm Replybullet Topic: This parameter or that parameter option?
     Posted: 20 Mar 2008 at 11:13am
Hey all,
 
Im just getting my feet wet with parameters and I have a report that would be perfect for them BUT:
 
The report I have is used to search through data based on 1 of 4 different parameters. I have it to see if we ever created a Purchase Order based on either the Work Order or Asset number it was tied to, or the item that was ordered. And also the reverse (if we have a work order or asset number and want to see what Purchase Orders were created for it).
 
As far as I can tell you cant have multiple parameters for this because it wants you to input ALL of the data instead of just one field like "PO Number" or "Asset number" I tried placing "or" instead of "and" in the selection formula but it still wants every piece of data when you refresh.
 
Is it possible to let the user select what they want to search by?
 
I hope this all makes sense.
 
Thanks!
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 20 Mar 2008 at 1:57pm
Create a parameter Field Type - i.e., PO Number, Asset Number, etc.  You should create a pick-list for this one to limit it to pre-defined values rather than relying on your users to type it in correctly.
 
Create a parameter for the Field Value.
 
Create a formula to use with your selection criteria.  It would look something like this:
Switch(
{?Field Name} = "PO Number", {table.PO_Number} = {?Field Value},
{?Field Name} = "Asset Number", {table.Asset_No} = {?Field Value},
<other fields here>
True, True)
 
-Dell
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