Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why won't this work (for me)?
Message
From
12/08/1999 11:53:40
 
 
To
12/08/1999 10:47:54
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00252698
Message ID:
00253037
Views:
26
>Hi Ed and Scott,
>
>I tried moving the NOCONSOLE around and it didn't help. I can get a file created using ASCII but I want to have is a report file in HP format so I can place the file on a diskette or server and have whoever print the report at their discretion. ASCII works but is very ugly.
>
>I tried recreating the report in VFP5 and sending that to a file and the same thing happened, file with 0 bytes and the report going to the printer. I think I must have changed an obscure setting somewhere but haven't a clue what it could be.

Try the following:

Add a new local printer through the Add Printer Wizard. Select the appropriate printer driver for creating output for the HP (if you're trying to be very generic, try the HP Laserjet Series II driver.) When prompted for a port, select FILE:, and give the printer a name (I use HPTOFILE for mine.)

If you give the new printer definition the name HPTOFILE, when you do your REPORT, try the following commands:

SET PRINTER TO HPTOFILE
REPORT FORM G:\DB\SUBD\RPT_ALFA.FRX TO PRINT NOCONSOLE

This will bring up a dialog box that allows you to specify the name and location for the printed output. There are some distinctive advantages to doing this, for example, if you use TrueType fonts that may not be present on the system printing the file after copying it to disk, you can choose to handle TrueType fonts either by downloading them as bitmaps as a part of the output stream, or simply convert the output to a pure graphical format. AFAIK, there's no way to avoid the file selection dialog, unfortunately.

Alternatively, if your default printer is an HP with appropriate format, this might work:

SET PRINTER TO name of print file to create

SET PRINTER TO G:\DB\REPORTS\TEST.TXT
REPORT FORM G:\DB\SUBD\RPT_ALFA.FRX TO PRINT NOCONSOLE
SET PRINTER TO
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform