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!

VFP8 Chaining Reports - Help With NOPAGEEJECT

Status
Not open for further replies.

edbytes

Programmer
Aug 29, 2001
27
0
0
US

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.
 
I didn't realize it was in that forum or I would have asked you to redo it here before answering. Sorry.

All I said was that yes, if the settings in the report are the desired ones, then you would want them to override the default printer settings. That was why I wanted you to verify that they were what you wanted to do.

But also, if you run these reports individually, do they behave like they're supposed to, or do they only act up when they are run together?


-Dave Summers-
[cheers]
Even more Fox stuff at:
 
If I remove NOPAGEEJECT they will print on the desired stock but obviously they will come out seperately and not be stapled together.
 
Well, finally got it to work so I figure I will post it here in case anyone else is trying to accomplish the same. Though I have solved the problem, I think there is an issue with the NOPAGEEJECT clause (or something I'm completely missing) since despite the fact that you should be able to change paper trays while using NOPAGEEJECT and it is documented in at least one book.

Here's the bottom line. I'm using and HP Laserjet 9000dns (model prior to the hns for those who are familiar). Options include four paper sources a stacker stapler and a bunch of other stuff I haven't found a use for yet. When you access Printing Preferences select the Paper tab. There's an option under this tab called Use different paper for first page Select it and then make your selections. In theory this should not work since I'm printing two reports, but it seems using the NOPAGEEJECT clause it treats both reports as a single.

If anyone can shed some light on this I would appreciate it but at least this is a fix for what I wanted. Don't think it's the way I did it before but then again I don't really remember.

Hope this helps someone else.
 

Edbytes,

I've no experience with this type of printer, but I did notice your comment:

I think there is an issue with the NOPAGEEJECT clause (or something I'm completely missing) since despite the fact that you should be able to change paper trays while using NOPAGEEJECT and it is documented in at least one book.

It seems to me that the whole point of NOPAGEEJECT is to prevent a page throw at the end of the report, so the next report can print on the same physical sheet. I can't see how that can permit you to change the tray.

In other words, the behaviour you originally saw is just what I would have expected.

Anyway, the point is that you have got it working. It looks like your code was correct all along, and the reason it suddently stopped working after years of correct use was that someone had been meddling with the driver settings.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top