SQL Server Performance

Multiple Columns in Parameter Field

Discussion in 'SQL Server 2005 Reporting Services' started by Toni, Apr 23, 2006.

  1. Toni New Member

    Hi

    I have a report that has a number of parameters in it that the user must select prior to running the report. One of these parameters is the site_ref that they wish to use against the dataset. All my books point to the fact that if you wish, you can select what appears in the parameter field so the user does not get confused. So rather than the user having a list of site_ref which maybe useless to them, they can have a description next to each entry, e.g.

    site_Ref Estate_Name
    AL Aladdin's Cave
    TH Bug's Bunnies Home
    XN Aliens Home

    Then when the user selects what he wants from list, the actual value that is passed to the parameter is 'TH' for example. In Access I believe this was called Bound to column(?). I can find no where in the 'Report Parameters' dialog box that allows for multiple columns to be displayed. I have written the SQL to create the right data;

    Select site_ref, estate_name
    From dbo_src_centre_list
    Order By site_ref

    How can I get the parameter box in Reporting Services to allow the display of both columns but bind to the site ref when it comes to passing the info into the report. Although my books say you can do it, they don't tell me how. I have found how to get one or the other to display and the right one to pass the actually value through, but I would like to see both in list at the same time.

    Regards



    Toni Chaffin
    aka Toni
  2. Toni New Member

    I have resolved this by using the following code as my query as suggested buy someone else

    Select site_ref, site_ref + ' - ' + estate_name AS Label
    From dbo.src_centre_list
    Order By site_ref

    This then allowed to select the Label as the displayed option and the site_Ref as the value.

    Problem Resolved!!



    Toni Chaffin
    aka Toni

Share This Page