in

C1 Community

ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

Combining 2 reports into 1 PDF

Last post 01-08-2008 3:58 AM by BobLong. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 01-03-2008 10:19 AM

    Combining 2 reports into 1 PDF

    Is it possible to combine 2 reports into a single PDF, where one report is overlaid on top of the other?

    Essentially i am creating a number of reports that the client will print onto letterheaded paper, however they will also want to save the report as a PDF with the letterhead included (for emailing/printing on blank paper).

    i would rather not have to create 2 copies of each report (one with the letterhead & one without) for obvous reasons; i would rather be able create a single letterhead report and combine it with the original report and render to PDF.

    Is it possible to do this using C1report, and if so could you give me a pointer as to how to go about doing it.

     

    Thanks in advance

    Bob
     

  • 01-04-2008 2:05 PM In reply to

    • C1_GregL
    • Top 10 Contributor
    • Joined on 06-11-2007
    • Pittsburgh PA
    • Posts 500

    Re: Combining 2 reports into 1 PDF

    This can be done using subreports.  You have two reports and at runtime you can add the one report to the other by assigning it to a subreport field as such:

    C1Report1.Fields("Field1").Subreport = C1Report2

    Then you can change or clear the subreport at runtime. 

    Hope that helps,
    Greg

  • 01-07-2008 4:54 AM In reply to

    Re: Combining 2 reports into 1 PDF

    Thanks for this but its not quite what im looking for, it would still require modifying every report for changes in letterheads/footers etc.

    what i really want to be able to do is render 2 seperate full-page reports onto a single page and output them into a single PDF.

    i know there are components out there that can do this but since i'm currently using C1 i wanted to see if it had the functionality already.

     

    Bob 

  • 01-07-2008 3:16 PM In reply to

    • C1_GregL
    • Top 10 Contributor
    • Joined on 06-11-2007
    • Pittsburgh PA
    • Posts 500

    Re: Combining 2 reports into 1 PDF

    Two reports into one PDF is not possible through C1Report (without first combining the reports through a subreport).  But you can use C1PDF to generate a pdf from multiple objects including the pages from multiple C1Reports.  It's very easy to take each page from the Report.PageImages and draw them to a C1Pdf object.  Each report page can be a separate page in the PDF, or if the reports are small enough you can put them onto a 1 paged PDF as the attached sample shows.

    Hope that helps,
    Greg L

    Filed under: ,
  • 01-08-2008 3:58 AM In reply to

    Re: Combining 2 reports into 1 PDF

    Grand job, thats exactly what im looking for.

    Many thanks indeed.

     Bob.
     

Page 1 of 1 (5 items)
Contact ComponentOne: 1.800.858.2739 ©1987-2008 ComponentOne LLC All Rights Reserved.