Hi there.
I just upgraded to Q1 2010 and I am getting an error associated with any of my multivalue parameters.
Here is an example of the error: System.Exception: Invalid value of parameter 'Person'.
I am creating all of my parameters programmatically and if I change the parameter to multivalue = false, the report works fine. It seems like the changes associated with changing the UI object in the parameter structure while leaving it there temporarily for legacy purposes has caused an issue. Am I not initializing something (old or new) correctly?
See attached screenshot for Quick watch of created parameter.
Going to production soon! Any help is greatly appreciated.
Mike
Here is how I create/populate the parameter:
Telerik.Reporting.ReportParameter rp = new Telerik.Reporting.ReportParameter(); |
if (drp.TelerikName != null && drp.TelerikName != "") |
{ |
rp.Name = drp.TelerikName; |
} |
else |
{ |
rp.Name = drp.Name; |
} |
rp.Type = drp.ParameterType; |
rp.UI.MultiValue = drp.MultiValue; |
// dont show any parameters on the viewer page |
rp.UI.Visible = false; |
if (rp.UI.MultiValue == true) |
{ |
if (rp.Value == null) |
{ |
// Create new list |
rp.Value = new ArrayList(); |
} |
foreach (Pair valuePair in drp.ParameterValues) |
{ |
if ((string)valuePair.First == drp.Name) |
{ |
switch (rp.Type) |
{ |
case ReportParameterType.Integer: |
{ |
((ArrayList)rp.Value).Add(int.Parse(valuePair.Second.ToString())); |
..... |
As I mentioned before, this worked fine in the previous release. It is still an array list which should be correct.