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

preview then click print and reboots XP

Status
Not open for further replies.

samsnead

Programmer
Sep 3, 2005
100
CA
We have a report that uses vfp9 - see below. However if you preview the report then click print on the printer toolbar, system gets rebooted (no error message or anything - but a black screen). Any ideas or has anyone heard of this?

** To PDF
LOCAL pToolBar, lcPreviewCaption
pToolBar = CREATEOBJECT("CREATEPDF")
pToolBar.SHOW()
pToolBar.DOCK(0)

_REPORTPREVIEW = "ReportPreview.app"
_REPORTOUTPUT = "ReportOutput.app"

lcPreviewCaption = GetRealLabel("INQUIRY", "1013") && function that calls caption name

oRepForm = CREATEOBJECT("Form")
WITH oRepForm
.CAPTION = lcPreviewCaption
.WINDOWSTATE = 2 &&This will maximize the form
.SHOW()
ENDWITH
glNoLoad = .T. && prevents opening a new form from menu
_SCREEN.clsNavbar.combo1.enabled = .F. && disable chortcut pulldown combobox
_SCREEN.Closable = .F.

REPORT FORM FESI501 PREVIEW WINDOW (oRepForm.NAME)
 
Try installing another printer and set it as default by going to Control Panel/Add Printers, ... set this printer to pause.
Then try to print.

May be printer driver is a problem.



 
Samsnead,

I can't see anything in your code that would cause this behaviour. As NasibKalsi says, it's possibly a problem in the printer driver. If nothing else, it would be worth trying it with a different driver, just to see if it persists.

Failing that, there might be some corruption in the VFP runtime files, or in some other part of the system. You could try doing a complete re-install of VFP, or, better still, try running the program on a different computer.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Thanks guys - don't think it is printer as other users on our network can access. May be related to Acer monitor as a few of the users with the problem have Acer - but different monitors so....

Don't think it is vfp dlls as I can run all other reports with preview no problem so might be something else in the program. If I find out I will let you know. For now we have gone back to using SET REPORTBEHAVIOR 80 instead of SET REPORTBEHAVIOR 90
 
This report was unique in that it printed all information in the header. One of our programmers found that it had a mixture of float and fix relative to header in items printed (over 200 items printed). Once he changed it so that all items in the header were fix relative the reboot problem was fixed. This did not happen in VFP8 or if you use set reportbehavior to 80 - only if set reportbehavior to 90. So problem is solved (can't blame those printers or monitors!) Thanks for your help.
 
Glad to hear the problem's solved. I'm surprised that the fault lay in the report itself -- I wouldn't have thought that would cause a reboot -- but it does sound like the report was more complicated than average.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top