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