Home Subreports

summary report

edited November 2006 in Subreports
I have a report that shows commission amounts for all producers, one
page per producer

Page1 Producer A (header)

Amount Commission
$100 $10
$200 $20
-----------
$300 $30 (footer)

Page2 Producer B (header)

Amount Commission
$100 $5
$200 $10
-----------
$300 $15 (footer)


Now I want to create a summary page that just shows each producer's
total and a total for everyone.

Producer Amount Commission
A $300 $30
B $300 $15
---------------------
$600 $45

I tried creating a section subreport and placing it a dynamic summary
band and connected it to it's own pipeline/dataset. I built a seperate
dataset query to return the results I'm looking for, for just this
summary subreport.

However it only prints the first record. I searched this newsgroup and
I've double checked that the pipeline is indeed hooked up to the
dataset. I've hooked a dbgrid to the dataset the pipeline is on and I
see the correct data in the grid.

Is this just the wrong approach? Should I be using Variable's or Calc's
to keep a running total for each producer on the main reports detail
instead of getting the data I need from a seperate dataset component?

I saw one newsgroup message that mentioned having two subreports and the
main report is just a "driver-style" subreport, should I try that?

Daniel

Comments

  • edited November 2006
    Hi Daniel,

    In order for a report to successfully traverse your data, you will need to
    place all DB-aware components inside the detail band. The summary band will
    not traverse your data. This is why you are only seeing the first record in
    the dataset.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited November 2006
    Ok, I put the main report in it's own subreport, and I kept the summary
    page in it's own subreport.

    So now I have two subreports in the dynamic detail band, both set to
    section for printbehavior.

    Now I get a blank first page, then the pages of the main report, and the
    summary page still only has one record showing.

  • edited November 2006
    When I say summary page, I really mean summary report.

  • edited November 2006
    Hi Daniel,

    Sorry, I thought you were placing the db-aware components inside the summary
    band of the section subreport.

    If you are going to use two Section subreports as you describe below, be
    sure you only have the detail band present in the main report.

    Be sure you have the proper datapipeline connected to the second subreport.
    If is is, be sure the DB-aware components in the detail band of that
    subreport are accessing that datapipeline.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited November 2006
    Removing the header and footer bands from the main report fixed most
    things.

    Now I just can't seem to get my second subreport to show more than the
    first record. I've verified that the second subreport is connected to
    the second pipeline which is connected to the second dataset. Also
    inside the second subreport, the 4 TppDBText components use the second
    pipeline as well.

    It's strange though, on that second subreport I have a title band, a
    detail band and a footer band, all just tall enough to contain their
    components. When I generate the report, the title band shows my column
    header labels, then the first detail record prints and way down at the
    bottom of the preview screen is the footer TppDBCalc components.

    I'm going to try re-creating the second subreport and see if I can get
    it to work.


  • edited November 2006
    I remade the second subreport and it works. My main problem was having
    other bands besides the detail band on the main report.

This discussion has been closed.