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

Telerik Reporting (Two reports in one)

6 Answers 371 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Chris Thierry
Top achievements
Rank 1
Chris Thierry asked on 07 Aug 2012, 08:36 PM
Hi, I would like to know if its possible to run a report with two reports inside.
I have for example an "account summary" report (which is only one page), and another report "account details".
Right now are separated, but user want to see both at the same time.
Can I copy one report inside the other?, I believe I can't create two header sections or two footer sections.
The sections are really different but I need to bring both together one after the other in the same reportviewer.
Is it possible?
Thank you.

6 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 08 Aug 2012, 07:22 AM
Hello Chris,

I believe what you're looking for is the Report Book functionality which allows you to combine several reports into one.

All the best,
Steve
the Telerik team

BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >

0
Chris Thierry
Top achievements
Rank 1
answered on 08 Aug 2012, 01:27 PM
Ok, I'll try that. The problem is that I can´t find this ReportBookControl in my  VS 2010 toolbox, I tried to add it using Telerik.ReportViewer.WebForms.dll but is not add it to the toolbox, could you please tell me how to add it?

ReportBookControl exists for SL?

Thank you.
0
Steve
Telerik team
answered on 10 Aug 2012, 04:31 PM
Hello Chris,

There is no ReportBookControl for Silverlight and WPF viewers. However you can use the approach from our demos that we ship with the product installation. Namely create a class that inherits from Telerik.Reporting.ReportBook and in its constructor add the report you want to the report book e.g.:

public class ReportBook : Telerik.Reporting.ReportBook
   {
       public ReportBook()
       {
           this.Reports.Add(new DashBoard());
           this.Reports.Add(new ProductSales());
       }
   }


All the best,
Steve
the Telerik team

BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >

0
Bob
Top achievements
Rank 2
answered on 03 Apr 2014, 04:02 PM
Hi there -

I know this is an older post, but have a question regarding the report book.

I have 3 reports:  The first report is a summary report (1-page), then loop through data and generate the second report (n-times), followed by another summary report at the end.

I built the report book class which works fine when you have all the data at the time the report(s) are generated.  However in my case, I have to what seems like, build a report book on-the-fly, adding reports as they are created.

Currently I print the first report, then loop through the data, create and print the individual report(s) and follow up by printing the last report.  This causes the print dialog to appear n-times, or if I hide that option, the print que has dozens of reports.  This can cause other reports to sneak in and get mixed in the shuffle.

Therefore I would like to dynamically build a report book with all reports and then print as one single report.  Is that possible and can you provide me with some details on how to accomplish it?

Thanks
Bob



0
Nasko
Telerik team
answered on 08 Apr 2014, 01:55 PM
Hello Chris,

You can gather multiple reports in a Report Book, which will be displayed and processed as a single document at once. In the following code snippet a Report Book is created and a report is assigned to it and this is done in the application on the fly. The developer has the option to modify the report definitions/data sources, add multiple reports etc., before adding them to the Report Book:

Using a class containing the report definition:
var reportBook = new ReportBook();
 
//Create the report. You can also use a loop to create instances of multiple reports.
var report1 = new MyReport();
 
//Add the report objects to the report book.
reportBook.Reports.Add(report1);

Then you can display the Report Book item by assigning it to a Report Viewer as you'd do with any normal report:
var instanceReportSource = new Telerik.Reporting.InstanceReportSource();
instanceReportSource.ReportDocument = reportBook;
this.ReportViewer1.ReportSource = instanceReportSource;

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
Bob
Top achievements
Rank 2
answered on 08 Apr 2014, 02:55 PM
OK - now I understand.  ReportBook is a class of Telerik Reporting, not a class in the project that contains a group of reports.  So I can use this ReportBook as a container to hold multiple report.

Got it! 

Thanks!
Bob
Tags
General Discussions
Asked by
Chris Thierry
Top achievements
Rank 1
Answers by
Steve
Telerik team
Chris Thierry
Top achievements
Rank 1
Bob
Top achievements
Rank 2
Nasko
Telerik team
Share this question
or