ilich / MvcReportViewer

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

Having Issues adding parameters to report viewer in view. #177

Closed eoctavien closed 8 years ago

eoctavien commented 8 years ago

I have a report viewer that seems to be working just fine. However I have tried to add parameters and I receive an error stating that The type 'Microsoft.Reporting.WebForms.ReportParameter' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.ReportViewer.WebForms.... But I have added the references (several times). Here is an image of the error in question:

mvc report error

I want to make it clear that I do not actually get an error until I add the parameter parts. The report runs normally when it is omitted. There is one thing I have noticed. After I downloaded the nuget packages and added the references, I noticed the references (in the reference manager in visual studio 2013) were version 10.0.0.0. image However, I keep seeing version 11 in the web.config, and the .aspx files from the nuget. image Is there any idea what the problem could be? Any help would be great. Thank you.

eoctavien commented 8 years ago

Never mind, I found out it was indeed the wrong version that was throwing it off. I had to manually (for whatever reason) add the assembly in the web.config like this:

I also had to find the reference on my machine in the C:\Windows\assembly\GAC_MSIL... folder. In there I added these dlls:

Microsoft.ReportViewer.Common.dll Microsoft.ReportViewer.ProcessingObjectModel.dll Microsoft.ReportViewer.WebForms.dll Microsoft.ReportViewer.WinForms.dll Microsoft.ReportViewer.DataVisualization.dll.

Inside visual studio's reference manager (got there by clicking adding reference), I went to the browse tab on the left hand side, and added the dlls above (I had to delete the previous version in my project v. 10.0.0.0).

ilich commented 8 years ago

Thank you for the update.