Cindy,
I removed the device name (I left "DEVICE=") but I left the other information. I think I need to keep the orientation there since some reports are portrait and some are landscape. How much of that field do I need to get rid of? I currently have in the Expr field:
DRIVER=winspool
DEVICE=
OUTPUT=LPT1:
ORIENTATION=1
PAPERSIZE=1
COPIES=1
DEFAULTSOURCE=1
PRINTQUALITY=300
YRESOLUTION=300
TTOPTION=2
My problem seems to be that I need to print to a non-default printer. Is that specified in the Expr field above somehow?
Larry
>Did you also remove printer-specific information from the Expr field of the first record of your FRX file?
>
>>I am trying to allow my program to read the name of the desired report printer from a CONFIG.FPW file and print all its reports to that printer. I can get the printer name from the config file just fine but I can't seem to print to anything other than the current default printer. I know about REPORT FORM ... TO PRINTER PROMPT but there won't be a user there to select a printer each time. (It is kind of like a report server. Data files show up and reports get printed from that data automatically.) I need to be able to do this using code.
>>
>>I also have read about blanking out the TAG and TAG2 fields in the first record of the FRX file but that didn't make much difference. Output still went to the default printer. I tried using SET PRINTER TO NAME (printername) but that seems to just work with the ? command.
>>
>>I know it's possible to programmatically change the default printer and thereby fake out the report command but I have other apps running simultaneously that must print to the default printer. I don't want to change the default printer out from under the other program.
>>
>>Is there any hope of being able to print to a non-default printer without changing the default printer?
Larry Huisingh
Lockheed Martin Information Technology
Richland WA USA