Closed mtinnes closed 7 years ago
@mtinnes: could you give me any more info about the setup of your report? The "validValue" object is coming from the SSRS api (from definedReportParameter.ValidValues).
Could you maybe explain the parameters in use on your report as well as if you have any duplicated values that are valid values in the option list? If your issue is coming from the ValidValues.Add line then it indicates you have more than one value with the same name in your parameter's "Available Values" section of your report.
SSRS only provides two fields for me to use on the available values (Label, and Value). Just as defined in reports.
I've attached a picture of a sample report on where to be checking for duplicates.
notice you only have two fields (Label and Value).
As an example on my report, it would be as if I had the following:
1 | United States 2 | United States 3 | Canada 4 | Mexico
I'm totally willing to help here just looking for what's actually happening as I haven't run into this issue myself.
Thanks @alanjuden, you are right on, we have values which have identical labels. I don't see that the dictionary is being used and could possibly be changed to a simple list?
The SetParameters() function in ReportExportResult is using the report parameter label as a key, which is causing a collision with our dataset. The offending code is:
check needed before inserting into ValidValues