In a section layout, you can create a base report as a template from which other reports can inherit. This behavior is similar to creating a master report and is available in a Section Report (code-based) layout.
Inheriting reports is useful when multiple 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 other reports.
Use the following instructions to create a base report and inherit it in other reports.
Controls for rptLetterhead
Control | Section | Location | Size | Miscellaneous |
---|---|---|---|---|
Picture | PageHeader | 0, 0 in | 3, 0.65 in | Image = (click ellipsis and navigate to the location of your image file) PictureAlignment = TopLeft |
Label | PageHeader | 1.16, 0.65 in | 1.8, 0.25 in | Text = Inheritance Font = Arial, 15pt, style=Bold |
Label | PageFooter | 0, 0 in | 6.5, 0.19 in | Text = http://www.grapecity.com HyperLink = http://www.grapecity.com Font/Bold = True Alignment = Center |
You can use the Page Header and Page Footer sections to design the base report. When you create reports that inherit the layout from this base report, only the detail section is available for editing.
These steps assume that you have already added another Section Report (code-based) template. This report functions like a content report where you can create the layout of the Detail section.
To write the code in Visual Basic.NET
Visual Basic.NET code. Replace YourContentReport, YourProjectName and YourMasterReportName with relevant names. |
Copy Code
|
---|---|
Partial Public Class rptLetter Inherits YourProjectName.rptLetterhead |
To write the code in C#
C# code. Replace YourContentReport, YourProjectName and YourMasterReportName with relevant names. |
Copy Code
|
---|---|
public partial class rptLetter : YourProjectName.rptLetterhead |