Search code examples
crystal-reportsnumbersreportsubreport

Crystal Reports: how to show master report page numbers in subreport?


I have many master reports and I would like to unify the page headers of all of them by creating special sub report (template) which should display page numbers, print date, name of company etc. I want to avoid to put all of these information in each master report everytime I create new master report. 1. Is it possible to show master report page numbers N of M in the subreport without creating shared variable in each master report? 2. Should I use different method for creating such template? Thank you very much for the help. B.


Solution

  • I would recommend using the "Template Expert" (Report | Template Expert...) to do this type of formatting.

    A 'template' is just a RPT without a data source. Add the 'special' fields (e.g. Page N of M), apply fonts and coloring, etc.

    To use it, add the RPT to the template directory; in Crystal Reports, the templates are located in the C:\Program Files\Business Objects\Crystal Reports 12.0\Templates\en directory.

    In my experience, the template 'expert' does a decent job formatting the report-header/footer and the page header/footer sections.

    Another option is to always start with a pre-formatted report, rather than a blank one. I usually follow this approach.