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

Trying to display subtotal with subreport

edited July 2004 in Subreports
It used to be that all I had to do to make a subtotal was set up a
group, display the group data in the header, display detail in the
detail band, and display the subtotal in the group footer.

But now I'm doing this with a subreport and it's not working. If I put
the subtotal in the group footer of the main report, it just spits back
the first value read in the first record. If I put the subtotal in the
footer band of the subreport, it doesn't even print!

How do I do this?

TIA

rob :)

Comments

  • edited July 2004
    Hi Rob,

    I assume you are using DBCalc components for your subreports. Unfortunately
    DBCalc components will not calculate accross subreports. Instead, you will
    need to make the calculations manually using TppVariables and their OnCalc
    events. Try placing an invisible TppVariable inside the detail band of your
    subreport and a visible one in the group footer of your main report. In the
    OnCalc event of the invisible variable, update the value of the variable in
    the main report manually.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited July 2004
    In article <40fbcfb3$1@dm500.>, "Nico Cizik \(Digital Metaphors\)"
  • edited July 2004
    Hi Rob,

    Over the years ReportBuilder has been trying to keep up with its users'
    advanced requirements and therefore has been forced to become more advanced
    itself. A while back (over 4 years) we decided that connecting the master
    data to the report and allowing the detail data to connect separately to the
    DetailBand was too confusing and bad design so we took the SubReport route.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited July 2004
    In article <40fd5624$1@dm500.>, "Nico Cizik \(Digital Metaphors\)"
  • edited July 2004

    You can optionally create the group in the childreport rather than the main
    report - that would make it an easy DBCalc.

    The older architecture caused mass confusion for most customers. The current
    architecture does not - you simply connect each report/childreport to the
    datapipeline that you want to traverse. It is much, much simpler. :)


    --
    Nard Moseley
    Digital Metaphors Corporation
    www.digital-metaphors.com



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited August 2004
    Hi Nico,
    I have try to implement your following method but in my detail bank I
    could never 'see' any main report object. How do then do the update?


    --
    Best Regard
    Jonathan Liaw



  • edited August 2004
    Hi Jonathan,

    Usually you will place a TppVariable inside a group footer or summary band
    of the main report. Then you will update the value of that TppVariable in
    the OnCalc event of the TppVariable you have in the detail band of the
    Subreport. Follow the link below to download an example of this.

    http://www.digital-metaphors.com/tips/TotalsFromSubReport.zip

    --
    Best Regards,

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