This is a migrated thread and some comments may be shown as answers.

Bind Telerik.Reporting.Report object to a specific report

1 Answer 103 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 16 Jun 2014, 02:44 PM
Hi everybody,

i am currently testing to replace Crystal Reports in our ReportViewer Application with Telerik Reporting, but still having some issues.

In our Application are a lot of reports and so there is a report template class. A load function takes the filename of the Report Definition File as a parameter and the Report Document is created. Afterwards it is bound to a dataset and passed to ReportViewer Control.

As i understand Telerik Reporting there are no Report Definition Files, just c# classes, which include the definitions. My problem is, that i want to instanciate the Report by it's name and then pass it to the ReportViewer, so i don't have to make major changes in the code. Is their a way to create a neutral Report object (Telerik.Reporting.Report) and bind it to a Report Class afterwards? If have tried to use TypeReportSource and set the TypeName Property, but without success until now.

I only succeeded on creating a sample application, where i created an instance of my own report class and filled it with a dataset. But i don't know how to integrate it in the code of our ReportViewer this way.

P.S.: I am using Telerik Reporting v8.0 Trial Verision with Visual Studio 2010.

Kind regards
David

1 Answer, 1 is accepted

Sort by
0
David
Top achievements
Rank 1
answered on 17 Jun 2014, 07:31 AM
Okay,

yesterday was probably too exhausting. Today i fixed my problem immediately. Because my class inherits from Report, I can just instanciate it by doing:
Report report = new MyTelerikReport();

Kind regards
David
Tags
General Discussions
Asked by
David
Top achievements
Rank 1
Answers by
David
Top achievements
Rank 1
Share this question
or