use commands to populate lists for the user to select from for filtering

Posted on 2011-04-28
Last Modified: 2012-05-11
I have the following join statement using a parameter in my SQL command object:
 LEFT OUTER JOIN patient_fyi_flags fyi ON p.pat_id = fyi.patient_id AND fyi.Active_C = '1' AND fyi.pat_flag_type_c IN {?FYI Flag}
I have checked the checkbox "Allows multiple values" in the Command Parameter form.

How do I then somehow make it so that the command displays a list of FYI flags for the user to select from?
Question by:wdelaney05
    LVL 100

    Expert Comment

    I don't use commands very often.  I just tried to build one and at least in CR XI, I don't see a way to provide a value list for the parameter.

    I also don't see a way to allow it to accept multiple values.

    What version of Crystal?

    Where did you add the parameter?


    Author Comment

    Ah, it's you, mlmcc. I'm using CR 2008, version I added the parameter in the Parameter List in the Modify Command window. I selected the parameter name in the Parameter List in the Modify Command window, then clicked the Modify button. The Command Parameter window then displays. In that window you can check the checkbox "Allows multiple values".
    LVL 100

    Expert Comment

    That must be a new feature in CR2008.

    If I can get to a CR2008 install, I'll see if I can figure it out.


    Accepted Solution

    mlmcc: Ok, I just figured it out. In short, I built two command objects. I have my main one and then I have a second one with a "Select distinct fyi_id, fyi_flag_name from my table" SQL statement. I built a dynamic parameter list based upon the second command object's fyi_flag_name. I created a new parameter {FYI Flag} based upon this second command object. In my Select Record - Expert window, I entered the statement {} = {FYI Flag}. {} is from my first command object.  {FYI Flag} is from my second command object.
    I know this may be confusing. Let me collect my thoughts and then I will write a more detailed recipe on how to do this. This will take me a while...
    LVL 21

    Expert Comment

    by:Alpesh Patel
    There is parameter in that, 3 type to fill parameter value
    1. DAtaset,
    2. Manuall
    3. Query

    Use query window to fill the parameter options.

    Author Comment

    Apologies for the delay in closing this question!

    Author Closing Comment

    I guess I'll award my answer as the best by default. So far, this is working with {?fyiFlagID} as a command parameter. I set this up as a dyamic parameter, though, that calls a second command object named FYIFlagList. this command object has the following SQL:
    pat_flag_type_c AS "FYI FlagTypeID"
    , name
    from zc_bpa_trigger_fyi
    ORDER BY upper(name)
    For the dynamic parameter, I pointed it to FYIFlagList as the value source. The user is then prompted for the FYI flag from a dynamic list.
    Do not link the two command objects, together. You'll get an informational message if you ever update the SQL and then save: Your current link configuration contains multiple starting points. Please be advised that this is generally not supported.
    Just click ok - the functionality doesn't seem to be degraded in any way, I tested this quite a bit.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
    Hi, I am very much excited today since I'm going to share something very exciting Tool used for Analytical Reporting and that's nothing but MICROSTRATEGY. Actually there are lot of other tools available in the market for Reporting Such as Co…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    779 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

    18 Experts available now in Live!

    Get 1:1 Help Now