Search code examples
reporting-servicessql-server-2012ssasprompt

Show a Customized Text in the Prompt List


Goal:
Display the text "All State-Province" instead of "All geographies" at the prompt list in SSRS

Problem:
I tried googling around and in the end I don't know how to solve it.

Information:
*Im using SQL server 2012

enter image description here

enter image description here

enter image description here

enter image description here


Solution

  • I don't use Report Server 2012, but in 2008 the following applies.

    It depends on how you're populating your parameter,

    If you're declaring the values in a list

    SetParameterValues

    Right click on the parameter, and change the label text.

    or.....

    If you're populating from a query then you need to ensure that the value you're using to populate the label returns "All State-Province" instead of "All geographies".

    One way round this would be to set up a calculated field on the query used to populate the dataset

    something like

    =iif(Fields!LabelText.Value="All geographies","All State-Province",Fields!LabelText.Value)
    

    Then use that field as the label.

    ParameterQuery


    I see your update..

    What I believe you need to do, is set up a new calculated field on your GeographyStateProvince dataset

    Call it NewLabelText.

    Then use the expression

    =iif(Trim(Ucase(Fields!ParameterCaptionIndented.Value))="ALL GEOGRAPHIES","All State-Province",Fields!ParameterCaptionIndented.Value)
    

    Then as shown in my previous screen print, use the new calculated field instead of ParameterCaptionIndented


    You can see your datasets on the left of this picture.

    Datasets