Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Page setup and storing the default printer
Message
From
16/10/2000 17:15:02
 
 
To
16/10/2000 12:47:49
General information
Forum:
Visual FoxPro
Category:
Menus & Menu designer
Miscellaneous
Thread ID:
00429754
Message ID:
00430041
Views:
16
>You said SET PRINTER TO NAME SYS(1037) will change the default VFP printer. I just don't see how I can allow the user to store the VFP or the windows default printer along with the report.

When you save a report, VFP stores information about the currently selected printer in the first record of the report file. Specifically, it's in the Expr, Tag, and Tag2 columns - you can see this information if you browse the FRX file. If the default Windows printer is selected when the report is saved, then that's the printer whose information gets stored with the report. AFAIK there is nothing in the report file that says "this is the default Windows printer". Moreover, this may or may not be the same as the printer to which the report actually gets sent at run time, particularly in a distributed app.

One way to make your reports generic is to delete the contents of these three columns in the first record of the report file. That way there is no printer-specific information stored with the report at all, and the user's printer settings will prevail at runtime. This can be useful if a user has a type of printer that you, the developer, don't have.

In your situation, Mike's solution sounds like the right one: Use a table or some other mechanism to associate each report with a particular printer, based on the list of printers available in the runtime environment.

>BTW, thanks for all of your time...

You're certainly welcome. I hope some of this information was helpful.
Rick Borup, MCSD

recursion (rE-kur'-shun) n.
  see recursion.
Previous
Reply
Map
View

Click here to load this message in the networking platform