Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Microsoft: FoxPro FAQ


How Do I Print A Page Range by dgrewe
Posted: 17 May 00

Print the report to a text file
* Define an invisible window to accept report output.
define window _PRINT at 0.000, 0.000 size 5,100 title 'Printing'
activate window _PRINT noshow
repo form FOO
rele window _PRINT
* Now print for real, using m.PAGELAST in the footer.
repo form FOO noconsole to print prompt

This works great, except for the "prompt" in the second report, which lets them pick the printer. The printer they pick, such as a fax driver, sometimes has a different number of pages from the default printer. So the code above calculates m.PAGELAST with the default driver, but then the user prints to the fax, and m.PAGELAST is no longer accurate.

The solution seems to be to run sys(1037) at the very beginning of the above code. That way, m.PAGELAST would be calculated in the "dry run" with the same print driver that will be used when it actually prints. But after printing, I want the program to set Foxpro's default printer back to what it was. I tried using sys(1037)
after printing, and stuffing the keyboard buffer with Alt+D and Enter, but the dialog ignores the keyboard

Interactive mode - add the prompt parameter to the report form command
unattended mode - Use DOS method.

Interactive mode - add the prompt parameter to the report form command
unattended mode1 - Add the RANGE parameter to the report form command
unattended mode2 - Use Dos Method

Back to Microsoft: FoxPro FAQ Index
Back to Microsoft: FoxPro Forum

My Archive

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close