Select "All" in parameter dropdown

  • I have a stored procedure that selects a list of status' that I am using in a parameter.

    Example: Select statusid, statusdescription from status order by statusid

    The status are, New, Active, Pending, Terminated.

    In my SSRS 2005 report I have a parameter that is populated with the example query.

    This works fine but I need an option or a default of "ALL".

    Right now there is <select a value>

    I need to replace the <select a value> with the word "ALL"

    I have tried

    select 0, 'All'

    union

    Select statusid, statusdescription

    from status order by statusid

    but this throws an error.

    I have tried setting the default value in the report for this parameter to "ALL" but does not work.

    Can someone show me how to get the Default of "ALL"?

    much appreciated.

    Gary

  • I figured out the solution.

    Original Query

    select 0, 'All'

    union

    Select statusid, statusdescription

    from status order by statusid

    Improved query

    select 0 as statusid , 'All' as statusdescription

    union

    Select statusid, statusdescription

    from status

    order by statusid

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply