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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

entire report won't print, but will preview

Status
Not open for further replies.

scroce

MIS
Nov 30, 2000
780
US
I confess I have no clue as to why this is happening.

I have a report that previews just fine. When I go to print it, it acts normal in every way, you get the network print box telling it that page 1 is being sent, etc.

However, it never acutally comes out of the printer.

I'm sure there is no network error. I can print other things, even other reports just fine. It's not the printer, b/c the same thing happens if I send the print job to the another printer.

It must be something somewhere in the way I've coded the report, but I have no clue where it could be. I just have some code that opens the report. The user decides whether or not they want to print it by going to file>print.

I don't expect a full solution based on what I've written here, but I am hopeful that someone might suggest where I can try test/debugging, b/c as previously mentioned - I have no clue as to why this could be happening.






I am a nobody, and nobody is perfect; therefore, I am perfect.
 
Here's what was messing this up. I still don't know why this occurs.

in my class module of this particular report:
Code:
Private Sub GroupHeader0_Format(Cancel As Integer, FormatCount As Integer)


I had a simple procedure that reset some global variables that I had declared like so:

Code:
For counter = 0 To 10
    Set pubTemp(counter) = Nothing
    counter = counter + 1
Next

Apparently this bit of code seized the printing process. I took it out and stuck it into Report_OnClose.

It works now, but I don't really understand why. I know this is really arcaine and nobody probably cares, but does anyone have a hypothesis on why access does this.

thanks.

I am a nobody, and nobody is perfect; therefore, I am perfect.
 
I have the same problem with no resolve. My reports print hit-and-miss. I'm still at a loss!
 
the only thing I found was that a loop that runs before the print command actually occurs tends to lock up the printing process. Search for a loop somewhere in your code before the print command acutally occurs, and then comment it out as a test. I'll betcha that will allow it to print.



I am a nobody, and nobody is perfect; therefore, I am perfect.
 
I have a similar issue however my report prints BUT many of the calculations have #error in them when they preview just fine........ anyone know about that one?

Thanks!

Dawn Coleman, Business Analyst
UnumProvident Corporation

PLEASE RECYCLE AND ENCOURAGE YOUR OFFICE/COWORKERS TO DO SO AS WELL.
 
Dawn,

The only thing I can suggest is what I learned from my experimentation on this thread. Check in your report's class module, particularly in the _onFormat events, to see if there are any loops running.

If so, they may be suspect. You could try commenting them out or moving them so that they run elsewhere.

I am a nobody, and nobody is perfect; therefore, I am perfect.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top