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!

Report header and Page header question 1

Status
Not open for further replies.

benniesanders

Programmer
Jan 20, 2002
199
US
Hi there,

I'm new to Access reporting and need to ask a novice question. I need the title of the report to show on every page which I could put in the page header but I have a description that only needs to show on the first page, but the title needs to be above the description. Right now, the title of the report is in the report header and the description is in the page header. Of course, that's backwards for my needs, but if I switch them around, the description is above the title on the first page. There are three group headers underneath which work beautifully so I don't want to mess with those. Any help would be appreciated. Thanks.
 
Put the description in a label control (call it lblDescription) in the page header section, after the title. Add an event procedure for the PageHeader_Print event, and put the following code in the eventprocedure:
If Me.Page > 1 Then lblDescription.Caption = ""

Unfortunately, this will leave a blank space the size of your description on every page after the first. You would usually use the Can Shrink property to compress blank space out of a report, but the Page Header section doesn't have a Can Shrink property.

BTW, I also tried it with a text box, filling in the description on the first page only. Didn't work, still because the page header won't shrink. I also tried changing the height of the page header section, but that's not allowed in the Print event. Rick Sprague
 
Thanks a million, Rick. I'll give it a try and let you know how it works. Thanks again.
 
Brilliant idea. My description is a mass of labels and fields. Works great on the labels but I don't know what to do with the fields. I couldn't get it to work on the fields. Any other thoughts? Otherwise, thanks a million for the idea. I'm sure I'll use it often in other reports!
 
Just set the fields' Visible properties to False. In fact, you could do that for the labels, too, instead of setting the label Captions to "". Rick Sprague
 
I am trying to give you another star but I keep getting a diagnostic error. Oh well.

Anyway, PERFECT. I reversed the logic since my title is only two labels. It's working great. Can't begin to thank you enough for your efforts.
 
Greetings,

I have a form that display an employees Performance Plan, which is based on the employees job description. I have created this report to match the actual paper form this info normally appears on.

The report is set up thus:
The PAGE HEADER contains generic Form information, plus includes fields from the database, such as employee name, SSN, job title, grade, etc. It also contains the heading for the second part of the form, called PART II - PERFORMANCE ELEMENTS AND STANDARDS.

The DETAIL section of the Access report contains a field for the JobElement, Critical Element, and Performance Standards.

The PAGE FOOTER contains the authentication information, which are merely boxes and labels to hold supervisor and employee name and date signed information. Note that this part of the report is blank, and used only when printed, as it requires written signatures.

MY DILEMA: These Performance Standards most times require more than one page for all of the job elements. I only need the information that is in the PAGE FOOTER to display and print for the first page only.

How can I set all of the labels and boxes in the PAGE FOOTER to only print for the first page of the report?

Thanks in advance !!

Bob
aries170@comcast.net
robert.cole@dfas.mil
 
Here's what I used for the header in the 'on print' event. It should work for the footer as well!

Private Sub PageHeaderSection_Print(Cancel As Integer, PrintCount As Integer)
'show labels on each page except first
If Me.Page > 1 Then YourLabelName.Visible = True
If Me.Page = 1 Then YourLabelName.Visible = False
End Sub

It's not very elegant, but it works just fine. Good luck.
 
I am looking for a way to omit the Page Header when printing a Group Header.

Any Ideas
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top