Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Two Queries, One Report

edited July 2004 in General
Is there an example somewhere that would demonstrated how I can use the
results of two different queries in one report? The results of the first
query are to be printed on the first few pages, the results from the 2nd
query need to printed on the last page.

tia

Kevin

Comments

  • edited July 2004
    Hi Kevin,

    This can be easily done using Subreports. Simply create two datasets
    connected to two separate datasources and datapipelines. Then inside your
    report place two TppSubreports inside the Detail band connecting each one to
    one of the separate datapipelines. Be sure to set the second subreport to
    shiftrelativeto the first. The first subreport will traverse the data in
    the first datset and so forth.

    --
    Thanks for supporting ReportBuilder! Please vote for ReportBuilder in the
    Delphi Informant Readers Choice awards!

    http://www.delphizine.com/ballot2004/

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited July 2004
    Thank you. That helped me but the report generates too many pages. Page
    one and two are correct, but it is duplicated many times. My query only
    returns 12 rows for the fist page and 4 for that second page. I can click
    the "Next Page" button on the Preview tab 60 or more times and it keeps
    showing me that same report over and over with increasing page numbers.

    Any help would be appreciated.

    Kevin..


  • edited July 2004
    Hi Kevin,

    Be sure the Report.AutoStop property is set to True. You can also limit the
    number of pages in each report using the Report.PageLimit property.

    --
    Thanks for supporting ReportBuilder! Please vote for ReportBuilder in the
    Delphi Informant Readers Choice awards!

    http://www.delphizine.com/ballot2004/

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.