• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 626
  • Last Modified:

Filter Crystal Reports results by passing in a list

I am using asp.net and have a Crystal report which queries my Order table.  In this table the PK is the int ID.  I would like to pass the report a list of IDs to restrict the results to only orders whose IDs are in this list.   How can I do this?  I am new to Crystal I am uncertain even how to add paramters to the reports.

I also need to pass a second parameter of Status which can be either "O" for open or "C" for closed.  How can I have the report filtered by two parameters?
0
canuckconsulting
Asked:
canuckconsulting
1 Solution
 
mlmccCommented:
To create parameters

Right click PARAMETERS in the Field Explorer
Click NEW
Give it a Name - Status
Set the type to STRING
You can add values in the box
Click SAVE

Right click PARAMETERS in the Field Explorer
Click NEW
Give it a Name - IdList
Set type to NUMBER
In the bottom options
Set ALLOW MULTIPLE VALUES to TRUE

To use them
Click REPORT --> SELECT EXPERT --> RECORD SELECTION
{IdField} IN {?IdList}
AND
{StatusField} = {?Status}

mlmcc
0
 
canuckconsultingAuthor Commented:
Thanks!  I ended up passing the rpt populate datasets so did not need to pass the parameters as I controlled using raw data.  Keeping this for next time though!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now