or
I am using Telerik report viewer with entity fraework.
This is the code I am using to bind the report to the control.
When I run the app. I am unable to see the result on the reportviewer, but I am able to get the result set from database.
Where am I doing wrong?
Help me please...
Telerik.Reporting.EntityDataSource entityDataSource = new Telerik.Reporting.EntityDataSource(); <BR> entityDataSource.ObjectContext = typeof(MyEntities);<BR> entityDataSource.ObjectContextMember = "ReportSales";<BR> entityDataSource.Parameters.AddRange(new Telerik.Reporting.ObjectDataSourceParameter[] {<BR> new Telerik.Reporting.ObjectDataSourceParameter("SalesID", typeof(System.Nullable<int>),18),<BR> new Telerik.Reporting.ObjectDataSourceParameter("category", typeof(System.Nullable<byte>), 1)});<BR> <BR> Telerik.Reporting.Report report = new Telerik.Reporting.Report();<BR> report.DataSource = entityDataSource;<BR> <BR> this.DefaultReportViewer.Report = report;Hi,
I need to convert a string ('QReporting.Projects.Cy.ByStartDateAndEndDate.MyReport') to a report object. I mean, I need to create an instance similar to:
//reportViewr.Visible = true; ReportViewr1.Report = new QReporting.Projects.Cy.ByStartDateAndEndDate.MyReport(); Telerik.Reporting.Report report = (Telerik.Reporting.Report)ReportViewr1.Report;So, I'm trying to convert the string to object using the following code:
ReportViewer1.Report = ((ReportViewer)Enum.Parse(typeof(ReportViewer), "QReporting.Projects.Cy.ByStartDateAndEndDate.MyReport", true)).Report; Telerik.Reporting.Report report = (Telerik.Reporting.Report)ReportViewer1.Report;
But I'm getting an error:
Exception Details: System.ArgumentException: Type provided must be an
Enum.
Parameter name: enumType
Please, I need your help solving the above issue
Regards,
Bader