Blank page before report printout

CPuchalski

Registered User.
Local time
Today, 13:41
Joined
Mar 24, 2010
Messages
10
I am trying to print the first page of a report using the following VBA:

DoCmd.SelectObject acReport, "rptMyReport", True
DoCmd.PrintOut acPages, 1, 1, , 2

The issue I have is that the first copy always comes out as a blank page. Setting the number of copies to 1 gives me only a single blank page. If I set the number of copies to 2, I get 1 blank page and one copy of the report. If I set the number of copies to 3, I get 1 blank page and 2 copies of the report.

I have looked through everything I can identify in the report that may be causing this and I am stumped.
 
Do you have Grouping in your report?

Welcome to AWF by the way :)
 
Thanks for the welcome and the quick reply.

There is no grouping set up in the report. There are 3 sub-reports that the data for the main report is extracted from, but they are not printed.

There are no header or footer sections - only the detail section. It's actually a pretty simple report.
 
Could you please show a (legible) screenshot of the entire report in design view.
 
How do I go about showing the screenshot? I don't have access to a URL to post the picture to and I cannot just paste it into a response.
 
Does it happen with other applications? If that is the case, you have your printer set with a 'Separator Page'
 
Thanks for the input.

It does not happen with any other databases and it does not happen if I put this report into preview mode and manually print it - only when I use docmd.printout to send it to the printer.
 
What happens when you print the report using the built-in Print button?
 
I changed the VBA to the following to allow me to work with the report:

DoCmd.OpenReport stDocName, acPreview
DoCmd.PrintOut acSelection, 1, 1, , 2

The CoCmd.PrintOut command sent 2 copies of page 1 to the printer - 1 blank then 1 with the data. I then hit the printer icon in the Print Preview toolbar and got 1 copy of all 10 pages (I only want to print the first page) sent to the printer with no blank pages. Next I selected File - Print - and set it to print 1 copy of page 1. That is exactly what got sent to the printer with no blank pages.
 
Unfortunately, my Manager will not authorize me to post the database. Is there something in particular that you are looking for that I could look into?

I did try changing my default printer to send the pages to 2 different printers (all 3 of the printers are different models of HP LaserJet printers) but I got the same results. I don't have access to any other printers to try.
 
Ok. Show me the design view of your report as a screenshot?

Also show a screenshot of the form's property sheet on the FORMAT tab.

Plus a screenshot of the Detail section's property sheet on the FORMAT tab.

That's three screenshots to attach :)
 
Hopefully these are the screenshots you were asking about. If not, let me know and I can try again.
 

Attachments

  • Form Property.jpg
    Form Property.jpg
    106.4 KB · Views: 117
  • Report - property.jpg
    Report - property.jpg
    100.2 KB · Views: 107
  • Report.jpg
    Report.jpg
    95.4 KB · Views: 119
Sorry mistakenly said form's property sheet. Make that the report's propery sheet on the Format tab.
 
Ok, let's try this one. Did the other screenshots come out clear enough?
 

Attachments

  • Report - Form Property.JPG
    Report - Form Property.JPG
    52.2 KB · Views: 132
The others were ok thanks.

The new one you sent is the wrong one though. I was referring to the report not the form. :)
 
Last edited:
Sorry, I sent the wrong one. This should be what you are asking for.
 

Attachments

  • Report - Report Property.JPG
    Report - Report Property.JPG
    43.9 KB · Views: 78
Looked at the properties and can't see anything particularly wrong with it. It's hard to diagnose when you can't see the db.

Try removing all the controls except 1, reduce the size of the report by half (by moving the handles), then print and see what happens.

Do it on a copy obviously ;)
 
I'll try those suggestions but it will be a few days before I can get back with the results - I will be unavailable. Thanks for your assistance - I will post early next week with the outcome. Hopefully you will be able to see how the test comes out.
 
I just want to see if it's something to do with the dimensions of the report or otherwise. Keep us posted.

Cheers
 

Users who are viewing this thread

Back
Top Bottom