I have a SSRS report, in my report I have a dataset which has an ID and NAME field, then I created a parameter and set its value to ID from dataset and Label to NAME of dataset. I can see the label when I preview report and select it, but I am also showing the selected parameter on report for this I am using expression :
=Parameters!P_TargetBrand.Label
But when report runs it is showing parameter VALUE instead of Label.
My SQL version is :
Microsoft SQL Server 2008 R2 (SP1) - 10.50.2550.0 (X64) Jun 11 2012 16:41:53 Copyright (c) Microsoft Corporation Standard Edition (64-bit) on Windows NT 6.1 (Build 7601: Service Pack 1)
Now the 'label' field is something that the client sees on the UI as a friendly name. When a client runs the report, it gets executed against the 'value' field and so I was wondering if there was a way to tell SSRS to execute against 'label' field as oppose to 'value'.
To set available values for the second parameter In the Report Data pane, in the Parameters folder, right-click the first parameter, and then click Parameter Properties. In Name, verify that the name of the parameter is correct. Click Available Values. Click Get values from a query.
Setting default values for multi-value parameters If we want to set Select All option as a default parameter we need to follow the steps below: Choose Get values from a query under the Default Values tab. Set HRReportParameterDataset into the Dataset Combobox. Set JobTitle field into the Value field.
Case when your parameter is Single Value :
=Parameters!<ParameterName>.Label
Case when your parameter is Multi Values :
=Parameters!<ParameterName>.Label(0)
OR
=Join(Parameters!<MultivalueParameterName>.Label,", ")
For Additional information try here.
I came across this problem and as far as I can tell it is a bug unsupported feature.
On this page - http://technet.microsoft.com/en-us/library/gg731894.aspx
Addtl. Info: "The parameter must be explicitly bound to data using a dataset in the Visual Studio Tools for Microsoft Dynamics AX report model."
and
Addtl. Info: "The report viewer control does not support the ability to specify report parameter labels, only values."
In my case we're not using a bound dataset. Just our own backend and adding the parameter values to the reporting view object. So we're SOL. Really lame that we have to get a label/value pair. Then hit the database again to get the label for the selected value since we don't have direct access to the label.
I would love to be proven wrong.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With