Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Change Page Settings within Program
Message
 
To
11/06/1998 16:44:47
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00107348
Message ID:
00107393
Views:
16
>>>>My application enables users to select the names of one or more reports from a grid and to click the "PRINT" button to sent the reports to a printer. The users requires that, before the reports are printed, they can select the printer and change the page settings.
>>>>
>>>>The following code will pop out the "Print Setup" dialog box for every selected report: REPORT FORM myreport NOCONSOLE TO PRINTER PROMPT. Since multiple reports can be selected at one time, it is not acceptable.
>>>>
>>>>I have used the following code in the CLICK event of the PRINT button: SET PRINTER TO NAME GETPRINTER(). As a result, users are able to select the printer to use; however, all the changes they make about the Paper Size, Orientation, etc. are not in effect at all. According to the HELP, PRINTINFO() command tells the settings but the Print Setup dialog box is the place to change the settings.
>>>>
>>>>I suspect that my SET PRINTER... statment only changes the printer while the page settings are not actully changed until I issue a statement like: SET ORIENTATION... There is no such a command and I have no idea how to capture the setting values in the dialog box except for that of the printer driver.
>>>>
>>>>I have noticed that people at this forum have had similar problems. Anyone can help me with this? (BTW, I am using VFP3.) Thank you!
>>>
>>>I'm not sure that I completely understood the problem. Do you want your users could apply different print setting to each selected report or you want them to set common setting for all selected reports at once?
>>
>>To set common settings for all selected reports at once.
>
>What about calling
>=SYS(1037)
>and then loop through list of reports with REPORT FORM ... TO PRINT. Surely, you have to cleanup all FRXs files (Expr,Tag,Tag2 fields in the first record).

IT WORKED! Thank YOU so much!

By the way, after I cleaned all FRXs, those Expr, Tag, Tag2 fields kept blank. Also, if the use click CANCEL in the Print Setup dialog box, the reports will still be printed to the original printer. This is not very satisfactory. I hope it is fixed in later versions. Thank you again!
Previous
Reply
Map
View

Click here to load this message in the networking platform