ACC2: Group KeepTogether Does Not Apply to Multi-Column ReportsID: Q125234
|
Moderate: Requires basic macro, coding, and interoperability skills.
The group KeepTogether property does not apply to multiple-column reports
as the "Creating Snaking Columns on a Report" online Help topic suggests.
The Help topic states, in part:
To keep the first detail record with the group header, in the Sorting
And Grouping box, set the KeepTogether Property--Groups for the group
header to With First Detail.
In a multiple-column report, the group KeepTogether property applies to the entire page, not to the individual columns.
To avoid an abandoned group header at the bottom of a column, or to prevent
a group header from being printed beyond a certain position on the page,
use the following sample procedure as the event procedure for the group
header's OnPrint property. Modify the expression "(5 * 1440)" in the
procedure with the value beyond which you do not want a group header to be
printed. Note that the expression "(5 * 1440)" equates to 5 inches, because
there are 1440 twips in an inch. The sample procedure tests the report's
Top property (the position where the report will be printed) and if the
condition is true, causes the report not to be printed at that position but
instead moves down the page until the condition is false, which occurs at
the top of the next page. By default, the report's NextRecord and
PrintSection properties are set to True after each attempt to print a
section.
Sub GroupHeader3_Print (Cancel As Integer, PrintCount As Integer)
If Me.Top > (5 * 1440) Then
Me.NextRecord = False
Me.PrintSection = False
End If
End Sub
Microsoft Access version 7.0 includes a new report GrpKeepTogether property that specifies whether groups that have their KeepTogether property set to 'With First Detail' or 'Whole Group' will be kept together by page or column.
ControlSource: Country
FontSize: 12
FontWeight: Bold
For more information about the GrpKeepTogther Property, search for "GrpKeepTogether Property" using the Microsoft Access for Windows 95 Help Index.
Additional query words: multiple column keep together
Keywords : kbusage RptLayou
Version : 2.0
Platform : WINDOWS
Issue type :
Last Reviewed: April 8, 1999