Telerik Reporting (Two reports in one)

7 posts, 0 answers
  1. Chris Thierry
    Chris Thierry avatar
    138 posts
    Member since:
    Jun 2010

    Posted 07 Aug 2012 Link to this post

    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.
  2. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 08 Aug 2012 Link to this post

    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 >

  3. DevCraft banner
  4. Chris Thierry
    Chris Thierry avatar
    138 posts
    Member since:
    Jun 2010

    Posted 08 Aug 2012 Link to this post

    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.
  5. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 10 Aug 2012 Link to this post

    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 >

  6. Bob
    Bob avatar
    41 posts
    Member since:
    Mar 2012

    Posted 03 Apr 2014 in reply to Steve Link to this post

    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



  7. Nasko
    Admin
    Nasko avatar
    909 posts

    Posted 08 Apr 2014 Link to this post

    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.

     
  8. Bob
    Bob avatar
    41 posts
    Member since:
    Mar 2012

    Posted 08 Apr 2014 in reply to Nasko Link to this post

    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
Back to Top
DevCraft banner