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

Subreport and groupfooter

edited February 2003 in Subreports
Is there a way to have similar behavior like groupheader and
ReprintOnSubsequentPage, to groupfooter also?

The problem is that i want to have a header (groupheader) and a footer
(groupfooter) in subreport and i want them to get printer in every page.
With groupheader i use the ReprintOnSubsequentPage property and everything
works fine.. The problem is that i get the groupfooter only at the end of
the group (which is logical) but if the detail overflows i want it printered
also at the end of the page.

Any ideas?

Thank you in asdvance

Yiannis Ioannidis
--

Comments

  • edited February 2003
    It is not supported natively in RB as a property like the group header band
    has. The problem is dynamic height detail bands and group footer bands. If
    the group footer is dynamic height, the group footer and any previous detail
    band(s) which had printed need to be taken off the page so that the group
    footer could have space to print on each page of the group. If you have
    static height detail bands and a static height group footer then you can
    code the report to show a group footer band on each page of the report, by
    drawing the band manually. The group footer band will have to be drawn by
    you using draw commands that you create. You can check to current variable
    values, such as a running total and use that to set the text of a
    TppDrawText that you create in the Report.OnEndPage event. Here is a simple
    example I put together today for you. I highlighted the group footers that
    are drawn manually.

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


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited February 2003
    Dear Jim

    Thanks a lot, your solution was really helpful.. Although there are a couple
    of problems which i managed to solve, I got the whole idea.
    I still have a small problem. I have to apply the whole idea on a subreport.
    So when i have to calculate the point where the print stopped
    (ReportEngine.PrintPosRect.Top) i have to add the report's top and the
    subreport's top. The report has title, header, detail and footer.Where the
    report's detail breaks the header is printed on the other page too. So far
    so good. The problem exists when i have no variable on the report's detail
    with ReprintOnOverFlow true so then report's Engine.PrintPosRect.Top is
    increased by the height of the report's detail band (the report's detail
    band is not printed - only the header). I don't know if it is all clear, but
    all i want is to get the subereport's Engine.PrintPosRect.Top reducted to
    the whole report (
    Report.Engine.PrintPosRect.Top+Subreport.Engine.PrintPosRect.Top is not
    always accurate..

    Thanks again for all the help you gave me. I hope you can help me to this
    one also...

    Regards
This discussion has been closed.