ReportBook Control

4 posts, 0 answers
  1. Nitin
    Nitin avatar
    2 posts
    Member since:
    May 2014

    Posted 18 Dec 2014 Link to this post

    Hi All,

    I am trying to create a report book using the designer within Visual Studio because I want my report to display each table of data in a separate worksheet within a workbook in Excel. 

    So Table 1 will be on Sheet 1, Table 2 on Sheet 2 etc.

    The only way I know to do this is to create a Report Book.

    Here are my questions:

    1. Is there an easier way to do this, as I do not want to create separate reports for each table.

    2. The Report Book control in my toolbox is visible, but disabled. How to enable this control if this is the only way to satisfy the requirement stated above.
  2. Alena
    Admin
    Alena avatar
    1049 posts

    Posted 22 Dec 2014 Link to this post

    Hello Nitin,

    1. The only way to export to different sheets in Excel is to use the report book.

    2. The Report Book is not a report item and as such it currently doesn't have a corresponding Toolbox item or design-time support. In order to use it you have to create a new report book object in your application, add reports to the object's report collection, and then display it in a Report Viewer.

    In the following code snippet you can see a Report Book class and reports assigned to it and this is done in the application. The developer has the option to modify the report definitions/data sources etc., before adding them to the Report Book:
    public class ReportBook : Telerik.Reporting.ReportBook
    {
        public ReportBook()
        {
            this.Reports.Add(new SalesByRegionDashboard());
            this.Reports.Add(new Dashboard());
            this.Reports.Add(new ProductSales());
            this.Reports.Add(new ProductCatalog());
            this.Reports.Add(new ProductLineSales());
        }
    }

    Then you can reference the report book to be displayed in the HTML5 Report Viewer by providing its AssemblyQualifiedName.

    Regards,
    Nasko
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. Nitin
    Nitin avatar
    2 posts
    Member since:
    May 2014

    Posted 22 Dec 2014 in reply to Alena Link to this post

    Hi and thanks for the follow up. I do have a question. This report (consisting of the 4 tables) is currently run using a parameter list from the report viewer. Right now luckily, I just use start date for the entire report. 

    However, when I create separate reports, for the report book, I will have to specify start date for each report correct?

    Then how does the report viewer work when I am using different parameters for different reports within the report book? How will the report book relay to the report viewer which parameters to display?

    Thanks!

  4. Alena
    Admin
    Alena avatar
    1049 posts

    Posted 25 Dec 2014 Link to this post

    Hello Nitin,

    The report book is shown as a single document in the report viewer and the parameters area is constructed based on the report parameters defined in all child reports. In case report parameters from multiple reports have the same name and type, and are configured as mergeable, you will need to specify the value for those parameters only once, and it will be used in all reports.
    This mechanism is further explained in the Report Book Parameters help article.

    Regards,
    Nasko
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top