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

??? Ejects Printer in VFP7 but not FPD26

Status
Not open for further replies.

holzert

Programmer
Jul 30, 2001
26
0
0
US
My problem is that I have some .frx reports, some .prgs that use @...SAY and some .prgs that use ??? to send text to the printer. All of them work EXCEPT the ones like EXAMPLE 2 below. I need to get example 2 working so I don't have to redo all of those .prgs IMMEDIATELY. They will be converted to reports later on, but there are too many to convert in my short deadline to get it working at least.

Also, if I issue printer commands in the middle of a document using ??? to issue bold for specific text for example, it ejects the page in VFP7 but not in FPD26. How to handle this without redoing all of the HUGE .prgs that print contracts using ??? and ?

EXAMPLE 1 WORKS CORRECTLY:


*--------------------------------
*Example 1
*This example works fine.
SET TALK OFF

opt = ''
port = GETPRINTER()


SET PRINTER TO NAME (port)
SET DEVICE TO PRINT

??? OPT

@10,10 SAY 'THIS IS A TEST 1'
@11,10 SAY 'No Page is ejected before the line above which is correct'

EJECT

SET DEVICE TO SCREEN
SET PRINTER TO

SET TALK ON
*End of example 1
*--------------------------------

EXAMPLE 2 IS WRONG--IT EJECTS A BLANK PAGE BEFORE THE PRINTED PAGE

*--------------------------------
*Example 2
*This example does NOT work-it ejects a blank sheet BEFORE printing everytime
SET TALK OFF

opt = ''
port = GETPRINTER()


SET PRINTER TO NAME (port)
SET DEVICE TO PRINT

SET CONSOLE OFF
SET PRINTER ON

??? OPT
?
? 'THIS IS A TEST 2'
? 'TEST 2 Ejects a blank page FIRST-which is WRONG'
?

EJECT

SET CONSOLE ON
SET PRINTER OFF

SET DEVICE TO SCREEN
SET PRINTER TO

SET TALK ON
*End of example 2

*--------------------------------

 
Change your single '?' to '???'. ??? bypasses the printer driver so it may thing you are wanting to start a new page with the single ?.

Dave S.
 
IT is actually the ??? line that ejects the page. It ejects at the ??? opt line. IF I change the printer codes (like to print a line in bold halfway through the page) then it ejects the next time I issue ??? opt also.
Tracy
 
Again, ??? bypasses the printer driver, where the others don't so it seems to me it is effectively trying to start a new report when you switch between ?, ??? and @..SAY. I could be wrong but I don't think it's a good idea to mix those 3 items on the same report. Try changing one of them to something like:

?
? OPT + 'THIS IS A TEST 2'
? 'TEST 2 Ejects a blank page FIRST-which is WRONG'
?

or

@10,10 SAY OPT + 'THIS IS A TEST 1'
@11,10 SAY 'No Page is ejected before the line above which is correct'

Or something along those lines.

Dave S.
 
Thanks for the ideas. When I change the codes from ??? to ?? or ? I do not get the printer settings (bold, condensed,etc).
Tracy
 
I also have many printer routines that I converted from FoxPro 2.6.... all written with ?? and ? and ??? for the control codes. I found an FLL on Universal Thread called Rawprint that takes care of the problem.
 
I tested the rawprint.vcx last night and it looks like it will solve my problem. However, with the rawprint.vcx I had to change all of the ??? to ?? for it work on the .prg reports I tested.
Tracy
 
I'm not having any problem with using ??? to send codes with RawPrint. Are you following their example of setting the printer to a file name and then using rawprint to print the file?.... that's what is working so well for me.... let me know if you need a code example
 

I having the similar problem with my Epson printer that it will print some blank line before opening my cash drawer
when I tried to open my cashdrawer when using ??? command,
could you all kindly sent me the Rawprint.fll file

Thank in advance.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top