You can create a base report class as a template from which other reports can inherit. This is useful when many of your reports share common features, such as identical page headers and footers. Instead of recreating the look every time, create template headers and footers once and use inheritance to apply them to your other reports.
In ActiveReports, you can use inheritance at both design time and run time. A simple example of how you can use this functionality is a company letterhead template.
To create a company letterhead template at design time
- Add an ActiveReport to your Visual Studio project and name the file rptLetterhead. This is the base report class.
- Drag the following controls from the ActiveReports toolbox to the indicated section of rptLetterhead and set the properties as indicated. Reports do not inherit from the detail section, so do not add controls to it.
Control Section Location Size Miscellaneous Picture PageHeader 0, 0 in 3, 0.65 in Image = (click ellipsis, navigate to C:\Program Files\GrapeCity\ActiveReports 6\Introduction (or to C:\Program Files (x86)\GrapeCity\ActiveReports 6\Introduction on a 64-bit Windows operating system) and select itopimage1.gif)
PictureAlignment = TopLeftLabel PageHeader 0.75, 0.65 in 1.2, 0.19 in Text = Control Yourself!
FontStyle = BoldLabel PageFooter 0, 0 in 6.5, 0.19 in Text = http://www.datadynamics.com
HyperLink = http://www.datadynamics.com
FontStyle = Bold
Alignment = Center
- Click in the grey area below the report to select it, and in the Properties window, set the MasterReport property to True.

Important: Do not set the MasterReport property to True until you have finished making changes to the report. Setting this property to True triggers major changes in the designer file for the report. - The detail section of the report is disabled. When you create reports that inherit from this class, they will provide the detail section.
- Add a second ActiveReport to your project and name the file rptLetter. This report will inherit its PageHeader and PageFooter sections from rptLetterhead.
- In the Solution Explorer tool strip, click the Show All Files button.
- Expand the rptLetter node and double-click to open the rptLetter.Designer file (in a C# project, right-click the rptLetter.cs node and select View Code to display the code view for the report).
- In the rptLetter.Designer code (in a C# project, in the rptLetter code), change the inheritance statement so that rptLetter inherits from rptLetterhead instead of from DataDynamics.ActiveReports.ActiveReport. Use code like the following:
To write the code in Visual Basic.NET Visual Basic.NET code.
Copy CodePartial Public Class rptLetter Inherits YourProjectName.rptLetterheadC# code.
Copy Codepublic partial class rptLetter : YourProjectName.rptLetterhead - Close the reports and from the Build menu, select Rebuild. When you reopen rptLetter, the inherited sections and controls are disabled.

Note: To make changes in these sections in rptLetterhead and rebuild your project again. -
Add data and controls to the detail section of the report as you would any other report. See the Basic Data Bound Reports walkthrough for more information.
![]() |
Caution: Base reports and the reports that inherit from them cannot contain controls with duplicate names. You can compile and run your project with duplicate control names, but you cannot save the layout until the duplicate names are changed. |
Walkthroughs
Overlaying Reports (Letterhead)
Hide All
