Reporting Services - Report Parameter - Available Values

I would like to interrupt my discussion of how to create an inbox at this time to point out a potentially annoying feature/defect in the ValidValues collection in Reporting Services.

When you add parameters to the report you can add a list of Valid Values. I think it's called Available Values in the UI. This would typically be a list of codes and display values used in a drop down list. The entries can be queried or hard coded right in the report.

Since we are building a front end to RS and passing the parameters to JSP for rendering on a web page we have to try a few different things, to make sure we can generically render the controls for gathering parameters on the web site.

So I created a test report which retrieved the customers from Northwind. The customer code is a string. So to keep it simple I made that a parameter and I put three of the customer codes into the Valid Values section of the report Parameter. Both the Label and Value were the same. I know this seems a bit odd, but I have seen real applications where this is the case. In some industries the code is known by the end user. For example they don't care that YYZ is the code for Toronto airport. They know YYZ is and that is what they want to see in a selection list. (calm down it's just an example)

Anyway back to the problem. If you create a parameter of the type string and fill in the Valid Value list with the same data in the label and the value, you will notice that when you call GetReportparameters to populate the parameter collection the valid value labels will be null. Perhaps someone thought if the value and label are the same they don't need the label. Although this might be true why make us write special code to know that and ignore the label. Just pass through the label as is even if it is the same as the value.

I hope it's just a bug and not a design decision. By the way I installed Service Pack 1 and it's still the same.