Blog Post

Strange but True - Report Parameter Label Blank

,

Here is another one of those strange but true things that I come across every so often which I thought I should point out. Its primary focus is when you create parameters in SQL Server Reporting Services. When creating available values for parameters, you can specify a label and a value. You can access the value and the label properties of the Parameter collection something like this:

 

=Parameters!ParameterName.Value

Or

=Parameters!ParameterName.Label

 

Normally, I set both the label and the value property, but what is strange but true is this:

 

If you specify values available and leave the LABEL’s blank (empty) (see figure 1), I would assume that nothing would be returned for the Parameter!parametername.Label property.

 

Figure 1: Blank Parameter Labels

Blank Available Labels

 

However, if you were to duplicate the above parameter properties, your results may be similar to mine shown in figure 2 below.

 

Figure 2: Results

Results 

 

For your convenience, you can download this example report here. I sincerely hope that you have enjoyed this quick blog. If you did, please rate it! Also, if you don’t already, please be sure to follow me on twitter at @briankmcdonald.

 

 

Brian K. McDonald, MCDBA, MCSD
Business Intelligence Consultant – Pragmatic Works

Email: bmcdonald@pragmaticworks.com | Blogs: SSRSGeek | SQLServerCentral | BIDN

Twitter: @briankmcdonald

 

Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating