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

ReportBook Control

3 Answers 72 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Nitin
Top achievements
Rank 1
Nitin asked on 18 Dec 2014, 07:17 PM
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.

3 Answers, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 22 Dec 2014, 03:11 PM
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.

 
0
Nitin
Top achievements
Rank 1
answered on 22 Dec 2014, 03:43 PM
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!

0
Nasko
Telerik team
answered on 25 Dec 2014, 08:35 AM
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.

 
Tags
General Discussions
Asked by
Nitin
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Nitin
Top achievements
Rank 1
Share this question
or