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

How using Print Dialog in own program? 1

Status
Not open for further replies.

FoxJunior

MIS
May 27, 2002
12
ID
Hallo All,

I'm a new member here and i'm a beginer Visual FoxPro Programing too.

Now, i want to print my report from Report Form, but i want to print from page 5 to the last page, but i don't know how i can do it from my program. Are there functions in Visual FoxPro 6.0 that i can use to solve my problem?

Thank's,

Ben
nb : Sorry, my english is not good - Thank you.
 
A couple of solutions:

1. ? sys(1037)
report form myReport.frx

The sys(1037) will bring up the printer prompt and in the property button you can specify the pages you want to print.

2. Report form myReport.frx NOCONSOLE TO PRINTER PROMPT
Will achieve the same as above.

3. If you know the range of pages you want to print you could use the Range clause
Report form myReport.frx RANGE 1,5 to Printer
 
Hi FoxJunior,

REPORT FORM myReport PREVIEW IN SCREEN TO PRINTER PROMPT

The preview will bring all pages on the previes screen. However, the printer choice will prompt for the printer and the page range etc.
******************************************
(Hi Mgagnon ... ) Mgagnons suggestion...
1. SYS(1037) will not provide the page range option.
3. Option 3 has practical limitations. nStartPage and nEndPage for RANGE can be passed thru but needs more working.

:) ramani :)
(Subramanian.G),FoxAcc, ramani_g@yahoo.com
 
Ramani

>1. SYS(1037) will not provide the page range option.

Really? Sorry, I could have sworn I saw the page range. Mind you it was 4:30 in the morning at that point.

 
If you wish to preview the report, THEN bring up the Print Dialog page where you can specify the page range, use this syntax exactly:

REPORT FORM myreport NOCONSOLE TO PRINTER PROMPT PREVIEW

I believe it was rgbean who first posted this, and he got it from someone at a recent Fox convention. I can't seem to find the original thread, though...

Ian
 
HI Ian,

You seem to indicate that what I posted will not work, since you write 'exactly'. I did read similar posting earlier by Rick as well.

What ever I have posted works perfectly under VFP7. I can vouch for that, since my code was just copied from my working button class.

If this doesnt work in other earlier versions, you can enlighten here. Have a nice day :)

ramani :)
(Subramanian.G),FoxAcc, ramani_g@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top