ACC2: Group Header or Group Data Missing on Page 1 of a Report (130368)
The information in this article applies to:
This article was previously published under Q130368
Moderate: Requires basic macro, coding, and interoperability skills.
SYMPTOMS
When you print a report, the report header and the page header are
printed on page 1, but not the group header or the group's detail
information.
CAUSE
The group header's ForceNewPage property is set to BeforeSection.
RESOLUTION
This article assumes that you are familiar with Access Basic and with
creating Microsoft Access applications using the programming tools provided
with Microsoft Access. For more information about Access Basic, please
refer to the "Building Applications" manual.
To work around this problem, create a page break before each group value on
the report.
To create the page break on your report, follow these steps:
- Open the report in Design view.
- Select the group header section and set the ForceNewPage property to
None.
- In the group header section, create a Page Break control at the top of
the section and set the following properties for the control:
Name: GroupHdrPageBreak
Top: 0
- Create a module and type the following lines in the Declarations
section:
Option Explicit
Dim FirstOne As Integer
- Type the following functions:
Function RHdrOnFormat()
FirstOne = -1
End Function
Function GrpHdrFormat (Rpt As Report)
If Rpt.page = 1 And FirstOne = -1 Then
Rpt!GroupHdrPageBreak.visible = False
Else
Rpt!GroupHdrPageBreak.visible = True
End If
FirstOne = 0
End Function
- Set the report header's OnFormat property to the following function:
=RHdrOnFormat()
- Set the group header's OnFormat property to the following function:
=GrpHdrFormat([Report])
- Choose Print Preview from the File menu. Note that page 1 contains the
first group value and its records.
STATUS
Microsoft has confirmed this to be a problem in Microsoft Access version
2.0. This problem no longer occurs in Microsoft Access version 7.0.
REFERENCES
For more information about forcing new pages in a report, search for
"ForceNewPage," and then "ForceNewPage Property" using the Microsoft Access
Help menu.
Modification Type: | Major | Last Reviewed: | 7/5/2002 |
---|
Keywords: | kbbug kbusage KB130368 |
---|
|