I've got a report that has several parameters, among them CompanyID. The available values come from a dataset with the Value field set to "Value" and the Label field set to "Label". Not exactly Rocket Science. The query looks like this:
select null as Value, ' Any' as Label
union all
select CompanyID as Value, CompanyName as Label from core.Companies
order by Label
Ok, no surprises. When I run that query I get things like
1506 Amalgamated Steel
2341 Beson Industries
245 Carver Holdings
etc....
Looks fine. However, when I view the HTML generated in report viewer, the select
element that is generated has ordered integers for values: 1,2,3,4 etc. so filtering the results by company ID isn't working.
What could cause this? The query is returning the correct values, the values are being populated in the dropdown, the Value field for the param is set to the Value field from the query. They just don't have the correct value in the select/option field.