Switching the picture back and forth in a report

J

Jonathan Blitz

I need to put a watermark on part of my report.

I need to decide at the start of a new group break if the next section will
have a watermark or not.

So I put code in the Format event of the header of the group and there I set
the picture or clear it (set it to "").

What happens is that it is set for the WHOLE report.
Even if I don't set it for the first entry it still does it for the whole
report.

Should I move the code to the PageHeader section?

What can I do?

Jonathan Blitz
AnyKey Limited
Israel
 
J

Jonathan Blitz

This is the code I have written:


Private Sub GroupHeader1_Format(Cancel As Integer, FormatCount As Integer)
If Me.Status = "OP" Then
Me.Picture = ""
Else
Me.Picture = "C:\Commissions Phase II\WATERMARK.JPG"
End If
End Sub

I want to set or unset a watermark depending on the value of the field
"Status".

This value can change during the report (back and forth between "OP" and
other values) and I only want the watermark for certain ones.

Problems is that ones I set it for one it applies to the whole report - even
the ealier parts.

Jonathan Blitz
 
J

Jonathan Blitz

I managed to do it in the end by puting it in the "On Retreat" event.

However, I ran into some problems.

Once I have set it I cannot remove it.

If I want to I have to set it to a blank jpg.

I have posted the code in another post further on.
 

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