help using reporttypesource with report book

2 posts, 0 answers
  1. Chris
    Chris avatar
    14 posts
    Member since:
    Sep 2014

    Posted 10 Jul 2018 Link to this post



    I am trying to show multiple reports in a reportbook object in WPF

    However , I do not get any ReportSources Collection on my reportbook object , only the reports collection.    When I try to use report instead of TypeReportSource it tells me Report is obsolete and I must use ReportSource .  I have a standard WPF window, with a reportviewer object but now I want to use a reportbook object to show multiple reports.


    var reportViewerWnd = new ReportBookViewerWnd();
                var report = new Telerik.Reporting.Report();

                var reportBook = new Telerik.Reporting.ReportBook();

                var typeReportSource = new Telerik.Reporting.TypeReportSource();
                typeReportSource.TypeName = "Schedwin.Reports.Tickets.PassengerTickets, Schedwin.Reports.Telerik";
                typeReportSource.Parameters.Add(new Telerik.Reporting.Parameter("ReservationIDX", ReservationIDX));
                typeReportSource.Parameters.Add(new Telerik.Reporting.Parameter("ReservationName", ReservationName));
                typeReportSource.Parameters.Add(new Telerik.Reporting.Parameter("PaxName", PaxName));
                typeReportSource.Parameters.Add(new Telerik.Reporting.Parameter("TicketNo", TicketNo));
                typeReportSource.Parameters.Add(new Telerik.Reporting.Parameter("IssuedBy", IssuedBy));
                typeReportSource.Parameters.Add(new Telerik.Reporting.Parameter("IssuedDate", IssueDate));
                typeReportSource.Parameters.Add(new Telerik.Reporting.Parameter("IssuePlace", IssuePlace));
                typeReportSource.Parameters.Add(new Telerik.Reporting.Parameter("RegionalDBName", DatabaseName));


                reportViewerWnd.ReportViewer.ReportSource = reportBook;
                reportViewerWnd.Title = "Passenger Ticket";

  2. Nasko
    Nasko avatar
    1090 posts

    Posted 10 Jul 2018 Link to this post

    Hello Chris,

    The ReportBook object has a ReportSources collection as shown in our API reference: ReportBook.ReportSources Property.

    If this property is not found in your application it means that you are using an older version of Telerik Reporting. In older versions of the product it is required to add report instances directly to the ReportBook.Reports Property [Obsolete].

    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top