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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to restrict page footer on other pages 1

Status
Not open for further replies.

Mackooo

MIS
Nov 17, 2005
18
US
How to restrict the visibility of a pagefooter section on the second or third page.

As I have a report with a sub report in the detail section. I have limited the number of records in the detail section to 10 records. The first page need information in report header and page footer has some information for comments. I would like not to have the page footer on the second page and next others (only first page should have page footer)

Also would like to increase the detialsection number of records to 20 on second page and so on.

Please help.

Thanks,
 
I think you need to look at report headers and footers and the Page Header and Page Footer properties of the report. [ponder]
 
Please specify what kind of properties that I should look for.
 
I did :). Page Header and Page Footer can be found in the list of properties for the Report. These can be set to various options such as "Not with Rpt Hdr".
 
This is another solution
Code:
Private Sub PageFooterSection_Format(Cancel As Integer, FormatCount As Integer)
	Me.PageFooterSection.Visible = (Me.Page = 1)
End Sub

________________________________________________________
Zameer Abdulla
Help to find Missing people
Do not cut down the tree that gives you shade.
 
Hi Abdulla,

I am having some trouble here, infact when I use this code the pagefooter does not show on any page.

Please help
Thanks a ahead....
 
try an alternate version
Code:
Private Sub PageFooterSection_Format(Cancel As Integer, FormatCount As Integer)
    Me.PageFooterSection.Visible = Not (Me.Page > 1)
End Sub

________________________________________________________
Zameer Abdulla
Help to find Missing people
Do not cut down the tree that gives you shade.
 
NO this also did not work...
I tried to use this with if...else.. state ment also

did not work..same result now page footer on any page

 
Move it it page event (either code will work)
Code:
Private Sub Report_Page()
   Me.PageFooterSection.Visible = Not (Me.Page > 1)
End Sub

Code:
Private Sub Report_Page()
    Select Case Me.Page
    Case Is = 1
        Me.PageFooterSection.Visible = True
    Case Else
        Me.PageFooterSection.Visible = False
    End Select
End Sub


________________________________________________________
Zameer Abdulla
Help to find Missing people
Do not cut down the tree that gives you shade.
 
Thanks a lot fot your answer, but no change this is still not working, showing page footer on both the pages now.
 
And this?
Code:
Private Sub Report_Page()
    Me.PageFooterSection.Visible = Me.Page < 1 = True
End Sub

________________________________________________________
Zameer Abdulla
Help to find Missing people
Do not cut down the tree that gives you shade.
 
Hi again,

But now show the the footheader in the preview but donot print when I print the report.

Please help

 
Hi Guys,

Please help as I am still not able to print the report as I preview it, as I disabled the pagefooter section on pages after first page. One thing I do like to tell you that I do have some subforms on my page footer which do not have any data but just few text labels.

Thanks for help in advance.

 
Thanks you guys, I got it done.

Private Sub Report_Page()
Me.PageFooterSection.Visible = Me.Page < 1 = True
End Sub

istead of "<" I used ">" and it worked fine.

Thanks for all the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top