Need both page headers and a watermark

C

Carl Rapson

I have a report that prints a page header only on pages after the first. I
accomplish this in the PageHeaderSection_Format event with the following
code:

Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As
Integer)
If (Me.page = 1) Then
' Save the page header section height
ht = Me.PageHeaderSection.Height
Me.PageHeaderSection.Height = 0
Cancel = True
Else
Me.PageHeaderSection.Height = ht
' Set the page header fields here...
End If
End Sub

This works great, except now I am interested in adding a watermark to my
report. I'm aware of the trick using MoveLayout to add a watermark to every
page of a report, but using this code:

Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As
Integer)
If (Me.page = 1) Then
' Set page header field .Visible property to False...
Else
' Set page header field .Visible property to True...
' Set the page header fields here...
End If
Me.MoveLayout = False
End Sub

causes the Detail section to print on top of my page header fields on pages
after the first (the top of the Detail section aligns with the top of the
Page Header section). Does anyone have any suggestion how I could go about
keeping my page header that prints only on pages>1 and also add a watermark
to each page (including the first)?

Carl Rapson
 
D

Duane Hookom

You can create pseudo page headers by creating a new primary sorting and
grouping level based on a constant expression like:
=1
Display the Group Header and set the Repeat Section to Yes. This will now
print the section on the top of every page following the page header. You
can use this section for your watermark (that code looks familiar).
 

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