I posted this in the general coding issues forum and was asked to move it. Dave Summers, if you read this please repost your last two reply's as they were deleted with the original thread prior to me reading them. Thanks.
OS: W2K
VFP: 8.0 with sp1
Here's the problem. I have to print two different reports, each on different stock and have the printer staple them. The printer is a laserjet 9000 dns which has a stacker/stapler and four paper sources. The vfp code I was using was the following:
SELECT file1
REPORT FORM report1 NEXT 1 NOCONSOLE TO PRINTER Nopageeject
SELECT file2
GOTO file1.record
REPORT FORM Report2 NEXT file1.records NOCONSOLE TO printer
I have setup the print driver as two different printers in an effort to trick the reports into doing what I want with no success so far. I have tried saving the printer environment to each report as well as not saving it and using the printer defaults, setting each printer to meet the requirements of each report. Using NOPAGEEJECT the second report keeps the stock choice of the first report instead of changing trays.
I had this program running correctly for years but one day it just stopped working correctly. I fixed it again but never did figure out how and now I'm back at square one. I know that using NOPAGEEJECT won't allow orientation changes but I wonder if this also controls paper tray selection as well. I don't think it should but at least currently, it is. Could this be a driver issue? I'm using PCL6 and had this working correctly with this driver.
I have requested help with this issue in the past but under different reporting circumstances hence the new thread.
RESPONSE FROM: DSummZZZ (Programmer)
Did you modify the reports using the correct stock options?
Open your report form using USE MyReport.FRX and browse the first record. Look at the Expr field and see if it has the same DEFAULTSOURCE as the first report.
You may need to remove that line, and empty the tag and tag2 fields. These will override the default printer settings.
-Dave Summers-
MY RESPONSE TO THIS:
The defaultsource options are different in each report. I would think I would want the reports to override the default settings since each used a different paper tray. If I erase this info I would lose that control.