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

Subreport Grouping Question

edited June 2003 in Subreports
Hello,

I am trying to use a subreport in the footer of a group to display
summarized data for the group.

In the detail section the records are grouped by an account number. Within
the account groups there are several funds with related numeric fields.

I need to show the totaled data for the funds within each group in the
footer. I am assuming a subreport is the way to go.

Header Account A
Detail Fund1 - 100
Detail Fund1 - 100
Detail Fund2 - 100
Detail Fund3 - 100
Detail Fund3 - 100
Footer Account A
Fund1 - 200
Fund2 - 100
Fund3 - 200

Begin Account B...

Thank you very much,
Michael Malinowski

Comments

  • edited June 2003
    To show summarized data on agroup, it is easier to use variables and dbCalcs
    rather than trying to print a subreport over a subset of data from the main
    pipeline. The calc components can be set to reset on group. The variable has
    a timing dialog that is accessed from the popup menu and can allow you to
    control the reset timing and the reset group values. I would suggest using
    variables to do all summary calculations for your group.

    The alternative is to fire a detail query that is parameterized to return
    only the records for that group when the group footer goes to print. Then
    you can use a subreport to calculate subtotals.

    --
    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited June 2003
    Jim,

    I apologize for not being able to grasp the whole idea. I agree that it
    would be preferable to use the dbCalcs and ppVars. I am trying to figure
    out where in the report to place the calc components. I need the subtotals
    for each of the funds within each account, to appear at the end of each
    account.

    Thank you,
    Mike

  • edited June 2003
    If you want to use a subreport, then the best approach is to parameterize
    another query and get the data once when each group footer prints. Reference
    the current datapipeline's group break value to get the value to
    parameterize the query. Use the GroupFooterBand.BeforePrint event to set the
    param on the query so that it fires before the subreport tries to open its
    pipeline and print. For an example of a manual master detail, which is a
    parameterized query in see this:

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


    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.