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

SubReports

edited June 2006 in General
Trying to set up a report similar to invoicing.
would like to have the client's current invoice
print out followed by a summary report of any
outstanding payments. so I have a dataset with
the current invoices numbers with client, a dataset
with the invoice items (master is the invoice numbers),
a dataset with outstanding invoices with the
master also being invoice numbers.


the report has a detail band with two subreports
in the detail band. the main report pipeline is
the invoice numbers, the first subreport pipeline
is the invoice items, and the second subreport
pipeline is the outstanding invoices. When i run
the report, i get the invoices showing up just
fine. i alsways get a blank page for the second
subreport regardless of whether there is any data
there and this means i do not get the second report
when there is data (just the blank page). I would like
to get no page if there isn't any data in the second
report. how do i do this?

I also do not understand why the second subreport
does not show up when there is data. any ideas on how
to fix that? thanks.

Comments

  • edited June 2006
    Hi John,

    Which version of ReportBuilder are you using? Be sure that the second
    subreport is set to ShiftRelativeTo the first subreport. Also be sure you
    are linking and ordering on the same field in both datasets. Setting the
    NoDataBehaviors of the ChildReport to ndBlankPage should give you the effect
    you are after.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited June 2006
    On Mon, 12 Jun 2006 13:52:36 -0600, Nico Cizik (Digital Metaphors) wrote:


    i am using 9.03. both subreports are pbsection so i cannot set
    shiftrelativeto. the main database has two fields -- invoice
    and client. subreport1 is a detail using the invoice field
    while subreport2 is a detail using the client field. are you
    telling me that this doesn't work?
  • edited June 2006
    Hi John,

    Thanks for the additional information. Sorry I misspoke in my last
    response. In order for a Master/Detail report to function correctly, both
    detail datasets need to be ordered on the linking field. The linking field
    can be different.

    From what you describe, it sounds like the second detail is returning no
    data and you have an empty band below your detail band such as a group
    footer or page footer. When using section subreports, you need to be sure
    there are no empty bands below the detail band or you will get a blank page
    at the end of your report. The order that section subreports are printed is
    determined by the z-order of the components on the main report. You can use
    the SendToBack and BringToFront popup options to alter this. Try printing
    the second subreport first and see what you get.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

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