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

Headers & footers - can these be shared between many reports?

edited August 2002 in General
I have an application that produces around 30 different reports, some
portrait and some landscape, but they all require identical information on
the footers and there is some common information on every header. What I
would like to do is define a base report on a base form where the base
report only contains the common information. Then in inherited forms I want
to load the main body of the report information from template files but this
doesn't work.

Is there a simple way of sharing the header and footer information between
multiple reports on multiple forms?

Regards,

Tom Munro Glass
TMG Consultancy Ltd

Comments

  • edited August 2002
    What I have done in the past is create a report that is just a common
    header, then when you are loading your other report assign the header of the
    "common header report" to it. And do the same for the footer.

  • edited August 2002
    So do you mean you have two TppReport components on your form, i.e.
    MyRealReport and CommonReport. Then after MyRealReport.Template.LoadFromFile
    you do somthing like MyRealReport.Header.Assign(CommonReport.Header);

    Presumably in the case, CommonReport could be on a base form since it isn't
    being changed and MyRealReport is on the real form?

    Regards,

    Tom Munro Glass
    TMG Consultancy Ltd

  • edited August 2002
    Yeah thats right, just sit the Common Report on its own form and assign the
    header as you need it, load the template first then assign, this will add it
    so you will still have the exisiting header as well, which can be usefull to
    store some header stuff that is specfifc to the report, or just hide it. You
    may find the header will apper under the original header, I overcame that by
    assigning the original header as well and that way you can switch the order
    around but their is likely a better way to do that.

  • edited August 2002
    Great, many thanks for the tip Tom. This should save me loads of hassle!

    Cheers,

    Tom Munro Glass


This discussion has been closed.