I have VFP9 SP1 installed and discovered an issue with retaining printer environments. There are a specific set of circumstances that produce this result. It seems I only get this behavior when I have my default printer set to a shared printer that is set up on a server that is running WTS. Keep in mind that I am not accessing this printer through WTS, but have the printer set up on my machine.
WTS is Windows Terminal Server, maybe? Craig Roberts
Here is how to reproduce this behavior:
1. Make sure you have a printer set up on a server running WTS.
2. Share this printer and set it up as the default printer on a desktop machine
3. Create a report
4. In design mode, Right Click on the report and select "Properties"
5. On the "Page Layout" tab select "Page Setup"
6. Choose "Landscape" as the Orientation.
7. Click "OK" and the check the "Save printer environment" checkbox on the Page "Layout" tab.
8. Click "OK" and save the changes to the report.
9. Issue the command "Report Form MyReport.frx NOEJECT NOCONSOLE PREVIEW"
10. The Report displays correctly in landscape mode.
11. Issue the command "Report Form MyReport.frx NOEJECT NOCONSOLE PROMPT PREVIEW"
12. The Report displays correctly in landscape mode, but when choosing to print, the report prints in Portrait mode
13. Issue the command "Report Form MyReport.frx NOEJECT NOCONSOLE PROMPT to Printer"
14. Select the printer and print the report. It prints in Portrait mode.
15. Issue the command "Report Form MyReport.frx NOEJECT NOCONSOLE to Printer"
16. The report prints correctly in Landscape mode.
The issue seems to be with using the "PROMPT" keyword. It seems that when the Print Dialog box is displayed, the printer's settings revert to its default settings.
This is not the case in any version previous to VFP9
This behavior occurs even when setting REPORTBEHAVIOR to 80
Setting Resource to off has no effect
If I have my default printer set to a printer connected to my local machine, I do not experience this behavior.
If I have my default printer set to a printer connected to another computer (Not running WTS) on the network, I do not experience this behavior.
Even if I access a different printer through the print dialog box, the portrait/landscape setting remains the same.
I checked this using VFP8, and I do not experience this issue.
I would be interested in knowing if anyone can prove or disprove this behavior.
( Topic last updated: 2007.11.26 12:14:45 PM )