Is there a way I can create a new instance of a rport using a variable containing the report name, such as:
rpt = new Telerik.Reporting.Report strRptName
We want to allow users to select reports for a report book and I would like to pass this data to the viewer as a list of report names. Possible?
2 Answers, 1 is accepted
0
Steve
Telerik team
answered on 11 Jan 2010, 11:54 AM
Hi Bob Bruce,
As you might probably know, the Report property of the viewer expects the assembly qualified name of the Report type. Thus in order to instantiate a certain report from its name, you should construct the assembly qualified name (e.g. Report="ClassLibrary1.Report1, ClassLibrary1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null") first and then pass that to the Report property of the viewer or add it to a report book e.g.:
Thanks. In trying this out, I may have misunderstood something. My class library is Named BobsReportLibrary, and the report I want to call is named rptPartsList. Can you give me an example using those names: