Hi. In one of my applications I have a couple of Landscape reports. I
send these reports to the windows spooler. Sending characters strings
and using SET PRINT FONT. To do this, I test PRTINFO(1) = 0. If true,=
SYS(1037) to allow the user to switch the landscape mode.

Couple of problems with this technique. One, the user might not switch
to landscape. Two, that print device stays in landscape mode until he
switches back or exits FoxPro.

Question. Is there a way my code could switch the print device back and
forth from landscape mode? Without the need of SYS(1037). Any advice
would be appreciated...Dennis

RE: Landscape reports by Leemi

Leemi
Mon Aug 22 12:52:35 CDT 2005

Hi Dennis:

You can programmatically alter the information in the Expr field to control
the layout:

http://support.microsoft.com/default.aspx?scid=KB;EN-US;133163

I hope this helps.

This posting is provided "AS IS" with no warranties, and confers no rights.

Sincerely,
Microsoft FoxPro Technical Support
Lee Mitchell

*-- VFP9 HAS ARRIVED!! --*
Read about all the new features of VFP9 here:
http://msdn.microsoft.com/vfoxpro/

*--Purchase VFP 9.0 here:
http://www.microsoft.com/PRODUCTS/info/product.aspx?view=22&pcid=54787e64-52
69-4500-8bf2-3f06689f4ab3&type=ovr

Keep an eye on the product lifecycle for Visual FoxPro here:
http://support.microsoft.com/gp/lifeselectindex
- VFP5 Mainstream Support retired June 30th, 2003
- VFP6 Mainstream Support retired Sept. 30th, 2003

>Hi. In one of my applications I have a couple of Landscape reports. I
>send these reports to the windows spooler. Sending characters strings
>and using SET PRINT FONT. To do this, I test PRTINFO(1) = 0. If true,=
>SYS(1037) to allow the user to switch the landscape mode.

>Couple of problems with this technique. One, the user might not switch
>to landscape. Two, that print device stays in landscape mode until he
>switches back or exits FoxPro.

>Question. Is there a way my code could switch the print device back and
>forth from landscape mode? Without the need of SYS(1037). Any advice
>would be appreciated...Dennis


Re: Landscape reports by Dennis

Dennis
Mon Aug 22 13:20:21 CDT 2005

Thanks for the reply. That would work, but I'm not using a frx report
file...Dennis

"Lee Mitchell" <Leemi@online.microsoft.com> wrote in message
news:qvHxHJ0pFHA.1204@TK2MSFTNGXA01.phx.gbl...
> Hi Dennis:
>
> You can programmatically alter the information in the Expr field to
> control
> the layout:
>
> http://support.microsoft.com/default.aspx?scid=KB;EN-US;133163
>
> I hope this helps.
>
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
> Sincerely,
> Microsoft FoxPro Technical Support
> Lee Mitchell
>
> *-- VFP9 HAS ARRIVED!! --*
> Read about all the new features of VFP9 here:
> http://msdn.microsoft.com/vfoxpro/
>
> *--Purchase VFP 9.0 here:
> http://www.microsoft.com/PRODUCTS/info/product.aspx?view=22&pcid=54787e64-52
> 69-4500-8bf2-3f06689f4ab3&type=ovr
>
> Keep an eye on the product lifecycle for Visual FoxPro here:
> http://support.microsoft.com/gp/lifeselectindex
> - VFP5 Mainstream Support retired June 30th, 2003
> - VFP6 Mainstream Support retired Sept. 30th, 2003
>
>>Hi. In one of my applications I have a couple of Landscape reports.
>>I
>>send these reports to the windows spooler. Sending characters strings
>>and using SET PRINT FONT. To do this, I test PRTINFO(1) = 0. If
>>true,=
>>SYS(1037) to allow the user to switch the landscape mode.
>
>>Couple of problems with this technique. One, the user might not
>>switch
>>to landscape. Two, that print device stays in landscape mode until he
>>switches back or exits FoxPro.
>
>>Question. Is there a way my code could switch the print device back
>>and
>>forth from landscape mode? Without the need of SYS(1037). Any advice
>>would be appreciated...Dennis
>



Re: Landscape reports by Gene

Gene
Mon Aug 22 16:26:39 CDT 2005

On Mon, 22 Aug 2005 14:20:21 -0400, "Dennis Allen"
<dennis@dennisallen.com> wrote:

>Thanks for the reply. That would work, but I'm not using a frx report
>file...Dennis

Use
keyboard "{tab}{tab}{tab}{tab}o{enter}" clear
for portrait or
keyboard "{tab}{tab}{tab}{tab}a{enter}" clear
for landscape. Follow this with
sys(1037) && Kludge: This form will flash, but too bad.

Then reset it to whatever is the reasonable default after
printing.

[snipped previous]

Sincerely,

Gene Wirchenko


Re: Landscape reports by Leemi

Leemi
Mon Aug 22 16:52:42 CDT 2005

Hi Dennis:

Then you must be using either ??? or @..SAY commands to send your report to
the printer. If you know the printer escape codes to switch between
landscape and portrait, then you might be able to use this code:

http://support.microsoft.com/default.aspx?scid=KB;EN-US;99595

I hope this helps.

This posting is provided "AS IS" with no warranties, and confers no rights.

Sincerely,
Microsoft FoxPro Technical Support
Lee Mitchell

*-- VFP9 HAS ARRIVED!! --*
Read about all the new features of VFP9 here:
http://msdn.microsoft.com/vfoxpro/

*--Purchase VFP 9.0 here:
http://www.microsoft.com/PRODUCTS/info/product.aspx?view=22&pcid=54787e64-52
69-4500-8bf2-3f06689f4ab3&type=ovr

Keep an eye on the product lifecycle for Visual FoxPro here:
http://support.microsoft.com/gp/lifeselectindex
- VFP5 Mainstream Support retired June 30th, 2003
- VFP6 Mainstream Support retired Sept. 30th, 2003

>Thanks for the reply. That would work, but I'm not using a frx report
>file...Dennis

>"Lee Mitchell" <Leemi@online.microsoft.com> wrote in message
>news:qvHxHJ0pFHA.1204@TK2MSFTNGXA01.phx.gbl...
> Hi Dennis:
>
> You can programmatically alter the information in the Expr field to
> control
> the layout:
>
> http://support.microsoft.com/default.aspx?scid=KB;EN-US;133163
>
> I hope this helps.
>
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
> Sincerely,
> Microsoft FoxPro Technical Support
> Lee Mitchell
>
> *-- VFP9 HAS ARRIVED!! --*
> Read about all the new features of VFP9 here:
> http://msdn.microsoft.com/vfoxpro/
>
> *--Purchase VFP 9.0 here:
>
http://www.microsoft.com/PRODUCTS/info/product.aspx?view=22&pcid=54787e64-52
> 69-4500-8bf2-3f06689f4ab3&type=ovr
>
> Keep an eye on the product lifecycle for Visual FoxPro here:
> http://support.microsoft.com/gp/lifeselectindex
> - VFP5 Mainstream Support retired June 30th, 2003
> - VFP6 Mainstream Support retired Sept. 30th, 2003
>
>>Hi. In one of my applications I have a couple of Landscape reports.
>>I
>>send these reports to the windows spooler. Sending characters strings
>>and using SET PRINT FONT. To do this, I test PRTINFO(1) = 0. If
>>true,=
>>SYS(1037) to allow the user to switch the landscape mode.
>
>>Couple of problems with this technique. One, the user might not
>>switch
>>to landscape. Two, that print device stays in landscape mode until he
>>switches back or exits FoxPro.
>
>>Question. Is there a way my code could switch the print device back
>>and
>>forth from landscape mode? Without the need of SYS(1037). Any advice
>>would be appreciated...Dennis
>


Re: Landscape reports by Gene

Gene
Mon Aug 22 19:01:38 CDT 2005

On Mon, 22 Aug 2005 21:52:42 GMT, Leemi@online.microsoft.com (Lee
Mitchell) wrote:


>Then you must be using either ??? or @..SAY commands to send your report to
>the printer. If you know the printer escape codes to switch between
>landscape and portrait, then you might be able to use this code:

I use set printer on and ? myself.

Better to go with sys(1037) for device independence in the
program.

Sincerely,

Gene Wirchenko


Re: Landscape reports by Dennis

Dennis
Mon Aug 22 20:23:58 CDT 2005

Using SET PRINT ON/OFF, ? and SET PRINT FONT. Output to a USB printer
on a network, so I cannot use ??? and printer control codes.

"Lee Mitchell" <Leemi@online.microsoft.com> wrote in message
news:efeRVP2pFHA.344@TK2MSFTNGXA01.phx.gbl...
> Hi Dennis:
>
> Then you must be using either ??? or @..SAY commands to send your
> report to
> the printer. If you know the printer escape codes to switch between
> landscape and portrait, then you might be able to use this code:
>
> http://support.microsoft.com/default.aspx?scid=KB;EN-US;99595
>
> I hope this helps.
>
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
> Sincerely,
> Microsoft FoxPro Technical Support
> Lee Mitchell
>
> *-- VFP9 HAS ARRIVED!! --*
> Read about all the new features of VFP9 here:
> http://msdn.microsoft.com/vfoxpro/
>
> *--Purchase VFP 9.0 here:
> http://www.microsoft.com/PRODUCTS/info/product.aspx?view=22&pcid=54787e64-52
> 69-4500-8bf2-3f06689f4ab3&type=ovr
>
> Keep an eye on the product lifecycle for Visual FoxPro here:
> http://support.microsoft.com/gp/lifeselectindex
> - VFP5 Mainstream Support retired June 30th, 2003
> - VFP6 Mainstream Support retired Sept. 30th, 2003
>
>>Thanks for the reply. That would work, but I'm not using a frx report
>>file...Dennis
>
>>"Lee Mitchell" <Leemi@online.microsoft.com> wrote in message
>>news:qvHxHJ0pFHA.1204@TK2MSFTNGXA01.phx.gbl...
>> Hi Dennis:
>>
>> You can programmatically alter the information in the Expr field to
>> control
>> the layout:
>>
>> http://support.microsoft.com/default.aspx?scid=KB;EN-US;133163
>>
>> I hope this helps.
>>
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>>
>> Sincerely,
>> Microsoft FoxPro Technical Support
>> Lee Mitchell
>>
>> *-- VFP9 HAS ARRIVED!! --*
>> Read about all the new features of VFP9 here:
>> http://msdn.microsoft.com/vfoxpro/
>>
>> *--Purchase VFP 9.0 here:
>>
> http://www.microsoft.com/PRODUCTS/info/product.aspx?view=22&pcid=54787e64-52
>> 69-4500-8bf2-3f06689f4ab3&type=ovr
>>
>> Keep an eye on the product lifecycle for Visual FoxPro here:
>> http://support.microsoft.com/gp/lifeselectindex
>> - VFP5 Mainstream Support retired June 30th, 2003
>> - VFP6 Mainstream Support retired Sept. 30th, 2003
>>
>>>Hi. In one of my applications I have a couple of Landscape reports.
>>>I
>>>send these reports to the windows spooler. Sending characters
>>>strings
>>>and using SET PRINT FONT. To do this, I test PRTINFO(1) = 0. If
>>>true,=
>>>SYS(1037) to allow the user to switch the landscape mode.
>>
>>>Couple of problems with this technique. One, the user might not
>>>switch
>>>to landscape. Two, that print device stays in landscape mode until
>>>he
>>>switches back or exits FoxPro.
>>
>>>Question. Is there a way my code could switch the print device back
>>>and
>>>forth from landscape mode? Without the need of SYS(1037). Any
>>>advice
>>>would be appreciated...Dennis
>>
>



Re: Landscape reports by Dennis

Dennis
Mon Aug 22 22:28:22 CDT 2005

Thanks for your reply. I added your keyboard commands. I'll let you
know how they work on the client site...Dennis

"Gene Wirchenko" <genew@ucantrade.com.NOTHERE> wrote in message
news:ljgkg1t5bh0d5gg3juql776vmnrqj349c4@4ax.com...
> On Mon, 22 Aug 2005 14:20:21 -0400, "Dennis Allen"
> <dennis@dennisallen.com> wrote:
>
>>Thanks for the reply. That would work, but I'm not using a frx report
>>file...Dennis
>
> Use
> keyboard "{tab}{tab}{tab}{tab}o{enter}" clear
> for portrait or
> keyboard "{tab}{tab}{tab}{tab}a{enter}" clear
> for landscape. Follow this with
> sys(1037) && Kludge: This form will flash, but too bad.
>
> Then reset it to whatever is the reasonable default after
> printing.
>
> [snipped previous]
>
> Sincerely,
>
> Gene Wirchenko
>



Re: Landscape reports by Dan

Dan
Tue Aug 23 11:51:34 CDT 2005

If you're using VFP9, a report may still come to your rescue here.

Sys(1037) now has 3 optional parameters for controlling the printer based on
printer information stored in an FRX. You could create an empty FRX that has
nothing BUT printer setup information, open that FRX exclusively, set the
printer with SYS(1037), print your stuff, and reset the printer to defaults
with another call to Sys(1037).

Dan


Dennis Allen wrote:
> Using SET PRINT ON/OFF, ? and SET PRINT FONT. Output to a USB printer
> on a network, so I cannot use ??? and printer control codes.
>
> "Lee Mitchell" <Leemi@online.microsoft.com> wrote in message
> news:efeRVP2pFHA.344@TK2MSFTNGXA01.phx.gbl...
>> Hi Dennis:
>>
>> Then you must be using either ??? or @..SAY commands to send your
>> report to
>> the printer. If you know the printer escape codes to switch between
>> landscape and portrait, then you might be able to use this code:
>>
>> http://support.microsoft.com/default.aspx?scid=KB;EN-US;99595
>>
>> I hope this helps.
>>
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>>
>> Sincerely,
>> Microsoft FoxPro Technical Support
>> Lee Mitchell
>>
>> *-- VFP9 HAS ARRIVED!! --*
>> Read about all the new features of VFP9 here:
>> http://msdn.microsoft.com/vfoxpro/
>>
>> *--Purchase VFP 9.0 here:
>>
http://www.microsoft.com/PRODUCTS/info/product.aspx?view=22&pcid=54787e64-52
>> 69-4500-8bf2-3f06689f4ab3&type=ovr
>>
>> Keep an eye on the product lifecycle for Visual FoxPro here:
>> http://support.microsoft.com/gp/lifeselectindex
>> - VFP5 Mainstream Support retired June 30th, 2003
>> - VFP6 Mainstream Support retired Sept. 30th, 2003
>>
>>> Thanks for the reply. That would work, but I'm not using a frx
>>> report file...Dennis
>>
>>> "Lee Mitchell" <Leemi@online.microsoft.com> wrote in message
>>> news:qvHxHJ0pFHA.1204@TK2MSFTNGXA01.phx.gbl...
>>> Hi Dennis:
>>>
>>> You can programmatically alter the information in the Expr field to
>>> control
>>> the layout:
>>>
>>> http://support.microsoft.com/default.aspx?scid=KB;EN-US;133163
>>>
>>> I hope this helps.
>>>
>>> This posting is provided "AS IS" with no warranties, and confers no
>>> rights.
>>>
>>> Sincerely,
>>> Microsoft FoxPro Technical Support
>>> Lee Mitchell
>>>
>>> *-- VFP9 HAS ARRIVED!! --*
>>> Read about all the new features of VFP9 here:
>>> http://msdn.microsoft.com/vfoxpro/
>>>
>>> *--Purchase VFP 9.0 here:
>>>
>>
http://www.microsoft.com/PRODUCTS/info/product.aspx?view=22&pcid=54787e64-52
>>> 69-4500-8bf2-3f06689f4ab3&type=ovr
>>>
>>> Keep an eye on the product lifecycle for Visual FoxPro here:
>>> http://support.microsoft.com/gp/lifeselectindex
>>> - VFP5 Mainstream Support retired June 30th, 2003
>>> - VFP6 Mainstream Support retired Sept. 30th, 2003
>>>
>>>> Hi. In one of my applications I have a couple of Landscape
>>>> reports. I
>>>> send these reports to the windows spooler. Sending characters
>>>> strings
>>>> and using SET PRINT FONT. To do this, I test PRTINFO(1) = 0. If
>>>> true,=
>>>> SYS(1037) to allow the user to switch the landscape mode.
>>>
>>>> Couple of problems with this technique. One, the user might not
>>>> switch
>>>> to landscape. Two, that print device stays in landscape mode until
>>>> he
>>>> switches back or exits FoxPro.
>>>
>>>> Question. Is there a way my code could switch the print device
>>>> back and
>>>> forth from landscape mode? Without the need of SYS(1037). Any
>>>> advice
>>>> would be appreciated...Dennis



Re: Landscape reports by Leemi

Leemi
Wed Aug 24 13:02:21 CDT 2005

Hi Gene:

Yes, you are correct. Using specific escape codes limit the portability of
the code. The more generic you make the code the better off you are.

I hope this helps.

This posting is provided "AS IS" with no warranties, and confers no rights.

Sincerely,
Microsoft FoxPro Technical Support
Lee Mitchell

*-- VFP9 HAS ARRIVED!! --*
Read about all the new features of VFP9 here:
http://msdn.microsoft.com/vfoxpro/

*--Purchase VFP 9.0 here:
http://www.microsoft.com/PRODUCTS/info/product.aspx?view=22&pcid=54787e64-52
69-4500-8bf2-3f06689f4ab3&type=ovr

Keep an eye on the product lifecycle for Visual FoxPro here:
http://support.microsoft.com/gp/lifeselectindex
- VFP5 Mainstream Support retired June 30th, 2003
- VFP6 Mainstream Support retired Sept. 30th, 2003



>Then you must be using either ??? or @..SAY commands to send your report
to
>the printer. If you know the printer escape codes to switch between
>landscape and portrait, then you might be able to use this code:

> I use set printer on and ? myself.

> Better to go with sys(1037) for device independence in the
>program.

>Sincerely,

>Gene Wirchenko

>