First, the new-line combination is chr(13) + chr(10), not the other way round. I suggest you define this as a constant:
#DEFINE NEWLINE chr(13) + chr(10)
??? "Line 1" + NEWLINE;
+ "Line 2"
Second, it seems to me that you have less trouble if you prepare your entire report (or label) and send it to the printer with a single "???" command.
For instance, you can prepare a text-file with ? and ??, and then use FileToStr() to load it into RAM, and print it with:
??? PrinterCodes + FileInRAM
I have done this in download #
9991; this may be useful to you if you do lots of text-mode reports.
>I am having a hard time getting VFP to print a single label. I am tring to print to a Epson LX-300+ with tractor feed labels. It is a Serial device (COM1). The problem I am having is when it prints through the windows print driver it uses the paper size of 8 1/2 by 11. I tried to bypass the print driver with ??? code but have not had any luck. With the code below it still uses the printer driver. If I use SET PRINTER TO COM1 it prints to another printer on the machine that is a USB printer. The OS is win98. Any ideas?
>
>
>SET PRINTER TO NAME "EPSON LX-300+"
>SET PRINTER ON
> ??? chr(27) + "E"
> ??? "Line 1 -------------"
> ??? CHR(10) + CHR(13)
> ??? "Line 2 ============="
> ??? CHR(10) + CHR(13)
> ??? "Line 3 +++++++++++++"
> ??? CHR(10) + CHR(13)
> ??? "Line 4 >>>>>>>>>>>>>"
> ??? CHR(10) + CHR(13)
>
>SET PRINTER OFF
>SET PRINTER TO
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)