ilich / MvcReportViewer

ASP.NET MVC Html Helpers for ReportViewer Control.
MIT License
282 stars 131 forks source link

How to pass values to multi-value parameters? #213

Closed sven5 closed 7 years ago

sven5 commented 7 years ago

I'm trying to pass values to a report using a multi-value parameter.

The code

foreach (var priceListId in priceListIds)
{
   model.Parameters.Insert(model.Parameters.Count, new KeyValuePair<string,object>("PriceListId", priceListId));
}

does not work. The parameters are sent to the report in this format: ["46f9d6b5-71a9-4147-a764-9e5b5810656e","6ffd60b1-7a92-49ef-bfa7-c0a4b3e7ad88"] The report engine does not recognize the values.

What's wrong?

Thanks Sven

sven5 commented 7 years ago

The problem is resolved, the error had nothing to do with MvcReportViewer. I had a problem sending the List to the server.