Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Please Help! Print group footer wit last detail 2

Status
Not open for further replies.

spitzmuller

Programmer
May 7, 2004
98
0
0
CH
Hi there

This must be a common problem but I couldn't find a thread that helped...

I would like to print a group footer with the last detail (if it doesn't fit on the page and a new page is required). Right now I sometimes get the group footer on a new page without any data and that's quite ugly.

Any help to this seemingly simple problem? Thanks Simon
 
This is an idea based on and requires a pagebreak to be inserted in the detail section.

Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Report.Top + Me.GroupFooter0.Height > 14800 Then
    Me.PageBreak1.Visible = True
Else
    Me.PageBreak1.Visible = False
End If
End Sub
 
Thanks Remou

Quite clever, really! Should have come up with it myself.

Still odd that there's no "Keep together with last detail" Option in Access for this.

Have a star. Simon
 
Hey!

If I translate to english, my report has the following:

Report Header --> Page Header --> =[Surname] Header --> Details --> =[Surname] Footer --> Page Footer --> Report Footer

I would like to keep the bolded always together on the same page - is that possible?

________________
Thanks,

Mare [thumbsup2]
 
You can check out the Keep Together property for GroupLevels in the Help files. If you set the property to 1, it should keep the Header, Detail and Footer sections together on one page.


Paul
 
Tnx for such a quick response, but I'm not sure where to find GroupLevels in the Help files... There is a Yes/No field Keep together in the Properties, but that's not it, is it?

________________
Thanks,

Mare [thumbsup2]
 
Open your report in design view. Then click on a group header or footer bar and open the properties for it. In the properties box, you will see one for Keep Together. Click on the line next to it and press F1. That will bring up the help file for that particular property.

Paul
 
For all newbies like myself: you don't even have to write any code: just select detail section, click the "Sorting And Grouping" button and in Keep together select Whole group.

Mare
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top