or
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
| ES00000120S9 |
09/03/2011 0:00:00 |
Mar'11 |
36,9388000000 |
20/02/2012 |
| ES00000120S9 | 09/05/2011 0:00:00 | May'11 | 38,3738000000 | 20/02/2012 |
| ES00000120S9 | 11/07/2011 0:00:00 | Jul'11 | 41,0802000000 | 20/02/2012 |
| ES00000120S9 | 09/09/2011 0:00:00 | Sep'11 | 47,0580000000 | 20/02/2012 |
| ES00000120S9 | 09/11/2011 0:00:00 | Nov'11 | 51,5185000000 | 21/02/2012 |
| ES00000120S9 | 09/01/2012 0:00:00 | Ene'12 | 52,7473000000 | 21/02/2012 |
| ES00000121J6 | 09/03/2011 0:00:00 | Mar'11 | 94,4507000000 | 20/02/2012 |
| ES00000121J6 | 09/05/2011 0:00:00 | May'11 | 94,7643000000 | 20/02/2012 |
| ES00000121J6 | 11/07/2011 0:00:00 | Jul'11 | 95,7689000000 | 20/02/2012 |
| ES00000121J6 | 09/09/2011 0:00:00 | Sep'11 | 97,2266000000 | 20/02/2012 |
| ES00000121J6 | 09/11/2011 0:00:00 | Nov'11 | 97,1023000000 | 21/02/2012 |
| ES00000121J6 | 09/01/2012 0:00:00 | Ene'12 | 97,4383000000 | 21/02/2012 |
| ES00000121T5 | 09/05/2011 0:00:00 | May'11 | 100,0459000000 | 20/02/2012 |
| ES00000121T5 | 11/07/2011 0:00:00 | Jul'11 | 100,4433000000 | 20/02/2012 |
| ES00000121T5 | 09/01/2012 0:00:00 | Ene'12 | 383,3258000000 | 21/02/2012 |
<basicHttpBinding>
<binding name="basicBinding">
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Windows" />
</security>
</binding>
</basicHttpBinding>