I try to implement Telerik Report in my WebApp and get runtime error.
Exception Details: System.TypeLoadException: GenericArguments[0],'BuilkReport.Areas.Report.Template.PoReport', on 'Telerik.Reporting.XmlSerialization.Current.ReportSerializable`1[TReport]' violates the constraint of type parameter 'TReport'.
These are the methods I use:
- Create a telerik report and create parameters for its constructor
- Create a model using Telerik.Reporting.InstanceReportSource as one of data members
- Use controller to get proper parameter for the model, then pass it to the view
These steps worked fine, with data going correctly as planned. In the view part, I use method found in this demo : http://www.telerik.com/community/code-library/reporting/general/using-telerik-web-reportviewer-in-asp-net-mvc-application.aspx
I simply copy those views into my project and pass the model from controller to be passed to ReportViewer1.ReportSource (instead of creating a new one like in the demo project)
Can anyone please help me with this? Thanks.