Blank Page at Odd-Numbered-Pages


S

S

Hi,

I have a report which displays Customer Details for huge number of
Customers.
I use double sided printer but I do not want reports of two different
customers to be printed on same paper (front and back). So I need to have a
blank page printed out whenever a customer report ends on odd-numbered-page
(so that new Customer's Report starts on a odd-numbered-page, i.e. on a new
paper).

For the same I wrote:

Public temporaryCustomer As String

Private Sub ReportHeader_Format(Cancel As Integer, FormatCount As Integer)
Me![MyPageBreak1].Visible = False
temporaryCustomer = Me!CustomerNumber
End Sub

Private Sub PageHeader_Format(Cancel As Integer, FormatCount As Integer)
Me![MyPageBreak1].Visible = False
If temporaryCustomer <> Me!CustomerNumber Then
If Me.Page Mod 2 = 0 Then
Me![MyPageBreak1].Visible = True
End If
End If
temporaryCustomer = Me!CustomerNumber
End Sub

The result of the code is as follows:

Customer Number Actual Pages Need Blank Page Geetting Blank
Page
Customer1 3 YES
NO
Customer2 1 YES
YES
Customer3 1 YES
YES
Customer4 2 NO
NO
Customer5 2 NO
NO

Problem:
1. I do not get a desired blank page after Customer1
2. Customer 2 starts on wrong page
3. Although I get desired blank pages for all customers except Customer1,
they all get printed on wrong sides of the paper as Customer1 does not leave
desired blank page.

Can anybody help me solve this problem?
Thanx a million in advance.
S
 
Ad

Advertisements

S

S

Dear Marsh,

As advised, when I added Customer Group Header and a pagebreak in this
header, I got desired blank pages.

Another Issue::
I also have fields on Page Header - CustomerID and CustomerName.
(These needs to be displayed on each page, and cannot be moved to Group
Header and displayed on the first page of each customer)
But I still have following problems:
1. On the blank pages, report displays these fields for the next Customer.
Can this be changed to the current customer?
2. Can the Page Header itself be ommited only from the blank pages?

Thank you in advance.
S
 
Ad

Advertisements

S

S

Hi,

Can any one help on the below problem?
I tried but since PageHeader_Format executes before any GroupHeader_Format
Events, I could not get desired result.
Any help on this would be highly appreciated.

Thanks in advance.
S
 

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