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

VFP Report not printing in windows 64 bit

Status
Not open for further replies.

rkdua66

Programmer
Jul 25, 2013
8
0
0
IN
I have created a report in VFP8 which is being printed successfully in windows 32 bit. When I run this report in Windows 64 bit (7 or 10) its displayed in print preview but not printed.

Please help me if have any idea with issue.
Thanks
ravinder
 
Take a look at your system variables such as _REPORTOUTPUT and _REPORTPREVIEW using DISPLAY MEMORY. Depending on where you have VFP installed, they may be pathed to "Program Files" or "Program Files (x86)". You may have to change that.
Or you can always copy the OUTPUT.APP and PREVIEW.APP to the working directory and set the variables to there.


-Dave Summers-
[cheers]
Even more Fox stuff at:
 
AFAIK _REPORTOUPUT would only play a role in a VFP9 report, VFP9 is still fully legacy.

Open the FRX from your PJX on your development PC as a table with USE yourreport.FRX and open the Expr memo of the first record. Remove the DEVICE= line with the printer used and other device specific settings, you can keep page orientation as portrait or landscape and such things, but with the DEVICE set to your printer users would need your printer to print the report. When this is removed the report will print to the Windows default printer.

Now you can add a "choose printer" menu item - if you like" - with
Code:
SET PRINTER TO NAME (GETPRINTER())
Brackets are of importance here

You can also tell users what their current VFP session printer choice is by reading the setting with the SET() function: [tt]Set("Printer",3)[/tt]. When starting your application the default of that is the Windows default printer. And this printer choice is only lasting for the current VFP application session, it won't affect the windows default, so when you restart you're back at Windows default.

This is fine, but you may offer to save the choice and so make a default application printer by saving the SET("Printer",3) as configprintername setting and restoring it at program start with SET PRINTER TO NAME (configprintername)

But last not least, in Windows 10 there's a very unfortunate automatic default printer management mode established making the most frequent printer choice the default and that way defying the meaning of default printer, this way actually the VFP printer choice can affect the windows printer default, but only because all printer choices affect it, no matter what application does make a normally only temporary choice. So untick this:
windowsmanageprinter_fd3vg9.png



To summarize:
1. Your VFP8 is still not having one of the best VFP9 report features, a checkbox "Save printer environment", which you can untick. VFP8 or below will always store your development environment printer used when designing the report and that typically hinders the report to be used. It's a well-known hack to remove that info from an FRX, also explained here: Look out for discussion about the Expr memo field. You'll see the DEVICE= line. That and other very device specific settings should not remain in an FRX to be usable for end users.
2. Set("Printer",3) tells what printer VFP will use when no printer is given by the FRX
3. SET PRINTER TO NAME (GETPRINTER()) will offer users the choice of printer, very Windows friendly only changing what YOUR application used
4. Windows 10 unfortunate printer management settings can change printer default, which is rudely overriding that for everyone.

This should give you everything to gain full control.

Bye, Olaf.

Olaf Doschke Software Engineering
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top