only one group per page

Z

zionsaal

How do you force the report to make a new page ?
I need to group items , but only one type per page.. or if its to big
tow pages but only one type in a page
 
F

fredg

How do you force the report to make a new page ?
I need to group items , but only one type per page.. or if its to big
tow pages but only one type in a page

Group the report by Item (in the report Sorting and Grouping dialog).
Then set the Item Group Header ForceNewPage property to
Before Section. It's on the group header properties format tab.
 
Z

zionsaal

Group the report by Item (in the report Sorting and Grouping dialog).
Then set the Item Group Header ForceNewPage property to
Before Section. It's on the group header properties format tab.

thank you!!!!!!!!!

and how can I bring the group header on every page
like if the group is more then one page I so the header only on top of
first page
and how can I put page of page number based on the group like each
item should start with page 1 of 1
 
Z

zionsaal

Set theGroupHeader Repeat section to Yes


See:
"Printing First and LastPageNumbers for Report Groups "http://www.mvps.org/access/reports/rpt0013.htm

--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail- Hide quoted text -

- Show quoted text -

thanks Fred
the problem was that in access 2003 its changes the the name of
PageFooter to
PageFooterSection

the new code:

'************ Code Start *************
' This code was originally written by James H Brooks.
' It is not to be altered or distributed,
' except as part of an application.
' You are free to use it in any application,
' provided the copyright notice is left unchanged.
'
' Code Courtesy of
' James H Brooks
'
Option Compare Database
Option Explicit

Dim GrpArrayPage(), GrpArrayPages()
Dim GrpNameCurrent As Variant, GrpNamePrevious As Variant
Dim GrpPage As Integer, GrpPages As Integer

Private Sub PageFooterSection_Format(Cancel As Integer, FormatCount As
Integer)
Dim i As Integer
If Me.Pages = 0 Then
ReDim Preserve GrpArrayPage(Me.Page + 1)
ReDim Preserve GrpArrayPages(Me.Page + 1)
GrpNameCurrent = Me!Salesperson
If GrpNameCurrent = GrpNamePrevious Then
GrpArrayPage(Me.Page) = GrpArrayPage(Me.Page - 1) + 1
GrpPages = GrpArrayPage(Me.Page)
For i = Me.Page - ((GrpPages) - 1) To Me.Page
GrpArrayPages(i) = GrpPages
Next i
Else
GrpPage = 1
GrpArrayPage(Me.Page) = GrpPage
GrpArrayPages(Me.Page) = GrpPage
End If
Else
Me!ctlGrpPages = "Group Page " & GrpArrayPage(Me.Page) & " of " &
GrpArrayPages(Me.Page)
End If
GrpNamePrevious = GrpNameCurrent
End Sub
'************ Code End *************
 
Z

zionsaal

I changed this line:
Private Sub PageFooter_Format(Cancel As Integer, FormatCount As
Integer)

to

Private Sub PageFooterSection_Format(Cancel As Integer, FormatCount As
Integer)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top