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

reports eject extra page at the end

Status
Not open for further replies.

sw1202

Programmer
Jan 16, 2007
18
US
Hi,
I have several reports that run and print without any problem for years, then suddenly right after my users restarted their computers after a recent automatic windows update, a blank page follows every report they print. I haven't been able to find what could cause the reports to act like that (no, I don't have printer environment saved). By the way, the printer model they use is HP LaserJet 4015. Does anybody have the same problem or have a solution/suggestion for me?
Thanks a bunch.
 
...after a recent automatic windows update..."
It's hard to rule this a VFP issue. Look at the OS updates, printer driver updates, maybe something on HP's printer drivers, or even on their website or forums.


-Dave Summers-
[cheers]
Even more Fox stuff at:
 
Thank you for your input. Like you said it's not VFP issue, it's more like a window update, printer driver issue but I tried to twist my code any way to see if there's anything I can do to fix the problem on my end, but no success. How do I check the printer driver updates (how do I know which one is a driver update)?
The tech support people have tried a different driver and that eliminated the problem ...for a couple of days, then the problem came right back :-(
I will check other forums and see if they have anything about this. Thank you very much for your suggestion, Dave.
If anybody have any idea or suggestion, I'd greatly appreciate it (I have pulled all my hair out over this issue!)
 
How do I check the printer driver updates

The driver can tell you its version number and date. With HP 400 series drivers, go to its Properties dialogue, and then to the About tab. You'll see a version number and a "configuration date", amongst many other details. Other makes and models of printer will have something similar.

that eliminated the problem ...for a couple of days, then the problem came right back

That suggests that the printer driver is indeed included in your automatic updates. You could take explicit steps to prevent that, but that's not really the solution to the problem. Your application should not depend on a particular version of a printer driver in order to work correctly.

Do you see the same behaviour with other application - outside VFP? I'm thinking of things like Word and Excel. If so, that suggests a bug in the printer driver. If so, you should take that up with the vendor's support people. Also, do some research in HP-related forums to see if others have seen this problem.

Mike



__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Mike, thank you for your reply. It works correctly in Word and other applications, but not in Visual Foxpro. Visual Foxpro printed properly on hp4015 before the windows updates and it is still printing correctly to other printers like hp2430 from the same applications. And here is a sample of the simple code to run the report:

SELECT statement
vlist = MESSAGEBOX('Would you like an edit listing?',4+32+256)
IF vlist = 6
report form stmbatch_c to PRINTER
end if;

I did not save printer environment and I could not find anything to make it printer dependent...
I have checked the HP forums but haven't found anything yet :-(
 
It works correctly in Word and other applications, but not in Visual Foxpro

That's a pity. I was hoping it would fail in all application, so that you could pin the blame squarely on the printer driver.

On the other hand, the fact that it works OK in VFP with other printers does point to the driver - especially as the problem occurred after a Windows update. I'm sorry I can't suggest a solution.

Unfortunately, the code you posted doesn't help. If the problem is in VFP, it lies within the report, not in the code that calls it. (By the way, I assume the last line of your code is a typing error. You can't have END IF as two separate words in VFP, and not with a semi-colon at the end.)

Mike



__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
:) You have quick eyes for debugging. I copied and pasted just part of the codes (there's more below with else...) and manually added the "end if;" in the post while my mind is still in the Oracle programming mode.
I am still hoping that someone will be able to shed light on this problem.
Thanks and have a nice day,
 
Mike said:
"You could take explicit steps to prevent that, but that's not really the solution to the problem."
Would you please point to the direction how these steps could be done?
Thanks.
 
This is usually a setting somewhere in Control Panel, which will vary with different versions of Windows. Try looking under Automatic Updates, or under System.

But do you really want to rely on that as the solution to your problem? It would mean that your application would rely on end-users going out of their way not to use the latest version of a driver. There might be good reasons - not connected with your problem - to update their printer drivers. And there would always be the risk that someone would update the driver anyway, without realising the implications.

If you are sure that a new version of the printer driver is causing the problem, then the correct solution is to report it as a bug to the printer vendor. In the meantime, try to get the users to use a different printer.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top