I'm currently upgrading Telerik reporting in my application from version 184.108.40.2068 to version 220.127.116.114. I am using Visual Studio 2010, using C#.
I'm encountering a problem with a report parameter using a sqlDataSource. At first, I was encountering a problem because an arraylist was being used in a parameter (as an ansistring). This caused an error with XML serialization. So I realized that an arraylist wouldn't work anymore. However, the query its using is relying on accepting a collection of values.
(e.g. (Where number.ID IN (@ValueType) )
I saw that I can change the parameter to accept multiple values from:
However, I can't seem to get it to work correctly. For some extra context I have also changed the collection to a hashset<int>.
The report parameters are being set with code that uses the reportviewer.
var genericReport = new GenericReport();
genericReport.ReportParameters["ValueType"].Value = hashValueGenerator("Selector");
//hashValueGenerator returns a hashset of integers based upon its selector
//This used to be an arrayListGenerator
From there, the code would then take the report that was generated and add it to the reportSource. (This part works fine.)
I believe I am setting up my value type incorrectly to accept the new collection I'm creating.
Here is the parameter as it existed before the upgrade:
This is my attempted fix to my problem:
Value: //Shown below as created in the Report Parameter Editor
//Only the bolded (non-default) changes are being displayed
//Organized to look like pseudocode, but I am using the editor
//Quotes are for readability, they are not used in the actual editor boxes
DataSource = sqlDataSource,
//The same as shown as the data source on the report designer.
I get the following error in my Report Viewer: "Missing or invalid parameter value. Please input valid data for all parameters."
Can anyone give me any insight as to what I'm doing wrong?
Thank you very much!