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

Windows Printer Preferences Overriding VFP report Printer Settings

Status
Not open for further replies.

edbytes

Programmer
Aug 29, 2001
27
US
Using VFP 8 and an HP 9000dns.

Current issue: When I set printer properties within a vfp report they don't get saved when I save the report. When the report prints, it prints with the current printer preferences established for windows rather than what I set for the report itself. The only setting that keeps seems to be the paper tray from which the report is selecting. Any ideas???
 
Currently Save Printer Environment is on and has not resolved helped.
 
Is this user on the same network as the developer is on? If it isn't then it's important the EXACT same printer name is used (not just the same printer type), or when VFP isn't able to find it, it'll use the default.

Rick
 
The program runs from the same machine it was developed on and the printer details are the same for the most part.
I'm getting the feeling that the past 3-4 years of this program running correctly was just dumb luck as I have not been able to duplicate it. Testing will continue....
 
No one has yet mentioned possibly needing to "hack" the report form's data table contents.

Have you looked into the Report's data table (FRX file) to see if the report itself has "inherited" a printer setting.

Code:
* --- To Clear "Inherited" Printer From MyReport.frx ---
* --- Be cautious since this will eliminate ALL printer settings ---
USE MyReport.frx
REPLACE Expr WITH "",;
     TAG WITH "",;
     TAG2 WITH "";
   FOR RECNO() = 1
USE

Or a more cautious approach....
Code:
* --- Again, for MyReport.frx ---
USE MyReport.frx
SELECT MyReport
BROWSE FOR RECNO() = 1
* --- Visually examine contents of memo fields: ---
*      EXPR (may want to retain some of the settings)
*      TAG  (should be empty)
*      TAG2 (should be empty)
USE

Good Luck,
JRB-Bldr
 
JRB-Bldr,
Of course in VFP 8.0+, you can set your report to not save the printer information. Menu->Tools->Options...->Reports(tab)->uncheck 'Save Printer Environment. Or when you have a report open, Menu->Report->Printer Environment (toggle setting).

No more need for messy "hacking" of the .SCX file!

Rick
 
As an expanded comment to what rgbean wrote, even if the VFP program's set not to save the printer environment, if the report form's Printer environment flag is checked, the printer information is saved anyway. So be sure those settings, in both VFP program and the report form, are set off.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top