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

Blank page ejected 1

Status
Not open for further replies.

michel392

Programmer
Dec 17, 2001
54
BR
Dear colleagues:
Every time I go out from a Visual FoxPro program a blank page ejects from my printer. This doesn't happen until I finish executing the program. I print a lot of reports from the program and it does the job as I expect, without ejecting additional pages at the end of each report. Only when I finish the program, a blank page ejects.
The same happens in a lot of computers I used the executable program.
How to avoid ejecting a blank page at the end of the program ?
Thanks,
Michel

 
michel392

Try using :
SET PRINTER OFF

After your print job. Or check for the page eject setting on your printer driver.
Mike Gagnon
 
Mike:

I followed your suggestion and put the SET PRINTER OFF command immediately after the printing commands. The result was the same (a blank page came out from printer after the program finished).

I did not try to change any printer configuration because I installed and ran the same program in four other independent computers and the result was the same. So if I change any configuration in my computer and if a blank page doesn't come anymore, I can't tell other users to whom I may distributed my program to change their printer configuration !

All other programs written in Visual FoxPro 6 that I wrote, have the same problem ! Users are asking me to correct this small incovenince

Thanks again,
Michel

 
michel392

All other programs written in Visual FoxPro 6 that I wrote, have the same problem ! Users are asking me to correct this small incovenince

Do you have a shutdown routine?
Mike Gagnon
 
Mike:
What do you mean for:
"Do you have a shutdown routine?"
Have you also had the same problem before in your programs(ejecting blank pages) ?
What do you suggest me to correct this ?
Thanks,
Michel


 
micheal932

"Do you have a shutdown routine?"

I meant, does your program go through a series of :
CLOSE ALL
CLEAR ALL
CLOSE DATABASE ALL
RELEASE ALL ETC...
Mike Gagnon
 
It’s possible as in your report to have in mainmenu bar – Report->Title/Summary checked both: Summary and New Page, but in report designer your Summary band is empty. In this situation, printing or previewing, the last page is blank (NOT SEND a blank page)
 
adriansoft

I think the problem only happens "Only when I finish the program, a blank page ejects." not when a report prints.

Mike Gagnon
 
Ok, you are right. I think … your problems origins are, 1000% in Deactivate, LostFocus, Destroy, Unload Events Methods or Shutdown routine: code like [??? ‘****’] or another print instructions in them may caused blank page ejected – but, certainly, you checked them. It’s possible as the problem’s localization to be hiding, within the above methods - form or objects classes. If isn’t, UFO over … in the same connection, please send for my bizarre collection, an email with sample attachment. Respectfully


 
michel392

Or check for the page eject setting on your printer driver.

If ALL your VFP apps eject a page, I might be tempted to think its a setting on the printer driver side.




Mike Gagnon
 
As a last line after completing the printing, (and thus SET PRINT OFF, use SET PRINTER TO (eventually followed by DEFA(ult)).
This should eliminate the problem.
 
Hi dear colleagues:
This is the program that ejects a blank page after I finish the application:

SET CONSOLE OFF
SET DEVICE TO PRINT
SET PRINTER FONT 'Courier New',10
SET COLOR TO RGB(0,0,0, 0,0,0), RGB(255,255,255, 255,255,255)

@ 5,10 SAY "HELLO !"
@ 7,10 SAY "THIS IS A PRINTED PAGE"

EJECT

SET PRINTER OFF
SET CONSOLE ON
SET DEVICE TO SCREEN

RETURN

Following the advice of wifredo (above), I changed the EJECT command to the SET PRINTER TO DEFAULT, and no more blank page was ejected. I don't understand why VFP 6.0 behaves this way (in FoxPro 2.0 I use EJECT and never get this problem !) but it solved my problem and I am happy !

Thanks to everyone,
Michel

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top