Filter Crystal Reports results by passing in a list

Posted on 2012-09-13
Last Modified: 2012-09-16
I am using 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?
Question by:canuckconsulting
    LVL 100

    Accepted Solution

    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

    To use them
    {IdField} IN {?IdList}
    {StatusField} = {?Status}


    Author Closing Comment

    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!

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
    More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now