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

3 SubReports and a Static Summary Possible?

edited September 2005 in Subreports
Hi,

I have trying to develop a report using RB Pro 9.02.
I have 1 main report and intend to insert 2 subreports.
The 1st subreport appear fine but once I include the 2nd subreport, all the
alignment runs and the I can insert header and footer since the main report
header and footer will override the subreports.

I have tired using Child, Section and shift relative property to adjust the
alignment but SubReport 2 always go out of alignment from SubReport 1. I
actually require continuous printing of Main Report, SubReport 1, SubReport
2. Alternatively, Main Report and SubReport 1 is continuous and SubReport 2
is on a brand new page.

Example

Main Report
Group Header 1
{Header}

SubReport 1
{Consist of header}
{Consist of details}
{Consist of summary}

SubReport 2
{Consist of header}
{Consist of details}
{Consist of summary}

Group Footer Header 1
{Summary at a fixed location bottom of the page where the users can tear
just like a normal payment slip}

Is such a design possible?
More importantly now I need to display a summary with fixed positions at the
last page of the reports (New Page is there is not enough space). I saw a
demo on
http://www.digital-metaphors.com/tips/AlignSummaryToBottom.zip

This seem to be correct but I am not sure how to incoporate into my design.
Must I use a region to make use of this feature? If necessary I can send you
my rtm template for review.
My email is aidi.sim@qalacom.com


My current layout is as followed.

Master Report
Header
{Display all the Company Logo, Address}

Group Header 1 (Invoice ID)
{Display the Title of Invoice}

Detail
{Invoice Details}

Group Footer 1 (Invoice ID)
{Display the Summary such as invoice subtotal,total, etc}
{SubReport 1 - Display some other invoices details from another datasource}


SubReport 1
Group Header 1 (CustomerID)
{Display the Title of Invoice-Other}

Detail
{Invoice-Others Details}

Group Footer 1 (CustomerID)
{Display the Summary such as invoice subtotal,total, etc}

Summary
{Display the Grand Total of all Details}

Comments

  • edited September 2005


    - A subreport set to PrintBehavior of pbChild pints like a memo - on the
    parent report's page space. It cannot have a header/footer. Use
    title/summary or groupheader/groupfooter instead.

    - A subreport set to PrintBehavior of pbChild can be configured to
    ShiftRelativeTo another pbChild subreport

    - A subreport set to PrintBehavior of pbSection will print independently -
    on its own page space. It will start on a new page and will not share the
    main report's header/footer. Section style subreports print in z-order. The
    report tree shows the components in z-order, use BringToFront, SendToBack to
    change it.


    One simple solution is to set Summary NewPage to true so that the summary
    will print on its own page space. Then set summary PrintPosition to specify
    the starting position (i.e. top) for the summary to start printing. The demo
    that mention could also be used - it is a more flexible in its solution.

    Overall I would approach this incrementally. Get the main working and then
    add one subreport and test that. Get it working. Then add a second subreport
    and test, etc. Finally add the summary.


    If you want to create a simple example, you can email to
    support@digital-metaphors.com in zip format. Use standard Delphi components
    and the DBDemos data. (If you send an example that we cannot run here, there
    is not much we can do to help.)





    --
    Nard Moseley
    Digital Metaphors Corporation
    http://www.digital-metaphors.com



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.