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

Create a Report Book for single report

3 Answers 521 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Craig
Top achievements
Rank 1
Craig asked on 05 Apr 2017, 10:11 PM

I have a ASP.NET application that uses a report viewer to generate a multi page page single report. The client wants each page to show in a separate tab when they select export to Excel. I have been doing some research and it seems like the Report Book is the way to go but I am finding the examples and documentation very lacking. I am looking to see if this is even possible with the current configuration.

My Setup:
I have a page with a grid control and allow multi select.
The user can select multiple rows and then click a "print" button
I open a RadWindow with a ReportViewer passing the string of ID's selected from the grid via querystring
On the Page_Load event of the RadWindow I pass the string of ID's to the report parameter
This pulls the selected records from the database and the ReportViewer shows one or more pages depending on the row selection.

This all works perfectly when printing the report. However, exporting to excel from the ReportViewer control results in a single sheet. 

Can I move this to a ReportBook? I only have one report (as a class) and it seems like the ReportBook is designed to combine different reports together. 

If the ReportBook is not possible is there another solution?

Thanks,
Craig

3 Answers, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 10 Apr 2017, 02:42 PM
Hello Craig,

You can add the same report multiple times in a ReportBook - How to: Create a Report Book at run-time.
Make the report parameter's Mergeable=false, in order to pass different ID to each newly added instance of the report.

The ReportBook instance, you created at run-time, can be wrapped in an InstanceReportSource in order to be displayed or processed via ReportProcessor.


I hope this helps.

Regards,
Stef
Telerik by Progress
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
0
Craig
Top achievements
Rank 1
answered on 13 Apr 2017, 09:46 PM

Thanks for the reply. This is something that I will look at if I get pressed into it.

I have convinced the client that the purpose of the control is to print and not generate excel exports. I am off the hook for a while but may have to revisit this.

Thanks

0
Stef
Telerik team
answered on 18 Apr 2017, 02:01 PM
Hello Craig,

I am attaching a demo project with a ReportBook gathering multiple instances of the same report, with different values for the report parameters of the report. Data in the report is filtered based on the report parameter. The project uses Telerik Reporting R1 2017 SP2 v11.0.17.406.

You can also check Telerik Document Processing Libraries, allowing you to post-process ready documents or to create such from scratch.


Please do not hesitate to contact us if you need further help.

Regards,
Stef
Telerik by Progress
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
Tags
General Discussions
Asked by
Craig
Top achievements
Rank 1
Answers by
Stef
Telerik team
Craig
Top achievements
Rank 1
Share this question
or