>>>Hi,
>>>does someone knows how to Set print mode (Landscape vs. Normal) programmaticaly?
>>>
>>>User don't want any kind of Dialog mode form to set it, want it to be automatic depending on the size of some text.
>>>
>>>Report is being printed using @SAY with font
>>>
>>>SET PRINTER FONT "Courier New", nTamFonte
>>>SET COLOR TO RGB(0,0,0,255,255,255), RGB(0,0,0,255,255,255)]
>>>@SAY....
>>>
>>>
>>>Or has a VB code that I can change to VFP that does it.
>>>
>>>TIA
>>> [ ]'s
>>>Peter
>>
>>This works for me:
>>* Landscape
>>??? CHR(27)+'E' + CHR(27)+'&l1O'
>>*portrait
>>??? CHR(27)+'E' + CHR(27)+'&l0O'
>
>Here it doesn't works...
>Is a USB printer and when I try the code the printer stops.
>
>I found another way:
>
>oPrinterConfig = CREATEOBJECT("pageset.PrinterControl")
>oPrinterConfig.ChngOrientationLandscape
>... Report here
>
>oPrinterConfig.ReSetOrientation
>
>
>But it would like to know why it works for you and not for me the code you wrote...
>
>Thanks
>
>Peter
One of the reasons of why "my" code did not work for you is that your printer itself or when USB connected does not accept PCL commands.