Hi,
I am using telerik repotrviewer for reports and here is my code that dynamically accessing report and assigning to reportviewer.
When I run the application I am getting the following error message.
"Exception has been thrown by the target of an invocation."
Here is my code:
Type reportManagerType = typeof(ReportClass);
_reportAssembly = reportManagerType.Assembly;
string assemblyName = _reportAssembly.GetName().Name;
_reportName = String.Concat(assemblyName,".", _currentReportInfo.Name);
_reportType = _reportAssembly.GetType(_reportName);
_report = (IReportDocument)Activator.CreateInstance(_reportType);
IReportDocument report = (IReportDocument)Activator.CreateInstance(_reportType);
this.DefaultReportViewer.Report = report;
Please help me...
I am using telerik repotrviewer for reports and here is my code that dynamically accessing report and assigning to reportviewer.
When I run the application I am getting the following error message.
"Exception has been thrown by the target of an invocation."
Here is my code:
Type reportManagerType = typeof(ReportClass);
_reportAssembly = reportManagerType.Assembly;
string assemblyName = _reportAssembly.GetName().Name;
_reportName = String.Concat(assemblyName,".", _currentReportInfo.Name);
_reportType = _reportAssembly.GetType(_reportName);
_report = (IReportDocument)Activator.CreateInstance(_reportType);
IReportDocument report = (IReportDocument)Activator.CreateInstance(_reportType);
this.DefaultReportViewer.Report = report;
Please help me...