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

Printing a report after preview 4

Status
Not open for further replies.

NeedERP

IS-IT--Management
Mar 9, 2004
15
US
I have a report form that displays in a preview window using the "REPORT FORM PREVIEW NOCONSOLE" command. A user can then print the report by clicking on the printer icon - but that sends it to their default printer. Is there a way to execute the "REPORT FORM PRINTER PROMPT NOCONSOLE" command from the preview window if the user decides that they want to print the report?
 

try using :
Code:
report form myReport.frx noconsole to printer prompt preview.

This will give you a preview, and when you click the print icon it will prompt for thew printer choice.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
If not more, then at least one star for this tip.
I'd only like to know how one can discover this:

- by chance
- by mistake
- debugging VFP.EXE
- being the author of Fox
- reading it at another forum (which one?)

Congratulations mgagnon!
Tom
 
Toman

If not more, then at least one star for this tip.
I'd only like to know how one can discover this:


Unfortunately I cannot directly answer that since I have known this "undocumented" little gem for a long time, but I cannot claim to be the originator of that, it was most likely posted somewhere (maybe a newsgroup) or FoxPro Advisor, but now you can find all these treasures at Tek-Tips.


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
The first "published" version of this, that I'm aware of, was by Cathy Pountney in a Devcon presentation ~ 3-4 years ago. It's also in her book "The Visual FoxPro© Report Writer: Pushing it to the Limit and Beyond" - available at
Rick
 
Mike,

Your code would be very useful to me. I tried it and all I get is the preview. I don't get prompted for a printer, nor does it send to the default printer. We are using VFP6 with no service pack (don't ask me, I just started here a few weeks ago).

Do I need a service pack or is it a VFP7 thing?

Thanks,
Steve
 
It is working fine for me and I am using VFP6 with the service packs. I have used it in several programs. It needs to be enter exactly as above. You can download the service pack from Microsoft.
 
spayne,

It worked fine with my VFP6 even before I downloaded any service packs. You get the preview, but when you press the Print button, you get prompted to make print selection. (Otherwise, when you press the Print button from the Preview mode, you would get your report sent to the default printer with other default settings.)

Stella
 
spayne

Do I need a service pack or is it a VFP7 thing?

No I've been using it since VFP5.0 . But as stella740pl states - First you see the preview and when you hit the print button in the preview toolbar, the rpinter prompt pops up.



Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
1.custmize foxuser.dbf
2.move window 'preview window' 0,0
mousedblclick 1,1
3.run away
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top