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!

? command print ok, but Report Form stop printer spooler !!! 1

Status
Not open for further replies.

Rajesh Karunakaran

Programmer
Sep 29, 2016
544
MU
Dear Friends,

I am trying to print from Win 10 64 bit to a network slip printer (IP connected). The printer is installed/connected in this pc. The test print from printer properties page is perfect.

From vfp, below code is printing without any issue:
Code:
SET PRINTER to default
SET PRINTER on 

?
?
? '** TEST *** 1'
? '** TEST *** 2'
? '** TEST *** 3'
?
?
?
?
?
?

SET PRINTER off 
SET PRINTER to

However, when I run a label form or report form, it just crashes the printer spooler.

By the way, a few more info:
My application is in C:\Program Files (x86) folder.
The application folder name has a space in it

I checked by copying this folder directly under the C drive. But, no luck.

Anyone has experienced similar issue? Any other clue/idea?

Rajesh

 
Rajesh,

Have you checked the "printer environment" setting in the report and label files?

To do that, open the report in the report designer (or the label in the label designer). In the Tools menu, look for the Printer Environment option. If it has a tick against it, remove the tick and save the report.

I'm not sure if that will solve the problem, but it is the first thing I would try.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Rajesh,

Have you checked if your program is set to use the requested printer (using SET PRINTER TO (yourprintername)?
I had similar problems and now I check first if the requested printer is available in the printer list.

This solved my problem.

Regards, Gerrit
 
Mike,

The Printer Environment is not set.
The printer is a slip printer which is set default. The printout is supposed to go in that.

Gerrit,
I am getting the printer in GETPRINTER(). We're not using SET PRINTER TO... in the program
as the printer is set default and we expect the printout to go to it if not specified otherwise.

Rajesh
 
Rajesh,

Have you tried using your with SET PRINTER TO (MyDefaultPrinter)and checked by code if the value of MyDefaultPringer is in your GETPRINTER list?

Worth trying.

Regards, Gerrit
 
I'm attempting to print from a network slip printer using Windows 10 64-bit (IP connected). This computer has the printer installed and connected. The printer properties page's test print is flawless.

The following code prints correctly from vfp:

CODE —>

PRINTER SET to default

TURN ON PRINTER



?

?

? '** TEST *** 1'

? '** TEST *** 2'

? '** TEST *** 3'

?

?

?

?

?

?



OFFSET PRINTER

ENABLE PRINTER



But every time I attempt to run a report or label form, the printer spooler crashes.



Additionally, here are a few details:

The Program Files (x86) folder on C: contains my programme.

There is a gap in the name of the programme folder.



I verified by duplicating this folder beneath the C drive. But no such luck.



Anyone with similar experience? Another tip or thought?
 
Hello Rajadv. Welcome to the forum. We will do our best to help you, but you need to start a new thread for your question. If you simply tag your question onto someone else's thread, it is less likely to be seen by forum members who might be able answer it. It is also unfair to the person who started the thread, as it will clutter the thread and distract attention from their answers.

To start a new thread, simply go to Foxpro forum front page, and scroll down to the area under "Start a new thread".

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Dear all,

I missed to update you all on this.

In my case, it seems that it was mainly a Driver related problem. If the printer is USB connected directly to the pc, it was working. But, when the same printer is IP connected (the printer supports direct LAN), it was giving various problems including the ones we were discussing. When we tried another driver (for same brand printers), which is an updated and common version for various models, printing was found to be okay. It also seems like, physically setting the Dip switches in the printer (for baud rate control) to the Default setup also played a role rectifying the problem.

However, to be frank, I am not precisely sure what was the actual problem and which of our actions, single or a combination, rectified it. At the end, the printer at least prints.

rajadv
You also may try the same paths.

Thanks
Rajesh
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top