NWP: # copies

Discussion about printing issues and techniques.

Moderators: Susan Smith, admin, Gabriel

Post Reply
Susan Smith
Posts: 717
Joined: Sun Aug 10, 2008 4:24 am
Location: Southern California

NWP: # copies

Post by Susan Smith »

Hi all,

Is there a way to set the number of copies in NWP? I see that the [COPIES(xx)] command in printer.sys applies to PCL only.

-- Susan

from the wiki:

Copies*

The following option will set the printer to print multiple copies.

* [COPIES(##)]* Will generate the pcl to make any number of copies

Use it like “[COPIES(14)]” to generate the pcl to instruct the printer to make 14 copies.
dmeenen
Posts: 50
Joined: Mon Jun 08, 2009 8:34 pm
Contact:

Post by dmeenen »

In order to print more than 1 copy in NWP,
you have to click on the Windows printer properties,
Advanced, set the number of copies to print.
Gabriel
Posts: 412
Joined: Sun Aug 10, 2008 7:37 am
Location: Arlington, TX
Contact:

Post by Gabriel »

You can always print the report in a big for loop, I suppose...
Susan Smith
Posts: 717
Joined: Sun Aug 10, 2008 4:24 am
Location: Southern California

Post by Susan Smith »

Oh, okay. So if it's critical that we print a specific number of copies (i.e. "carbon" copies) of a form, either we need to:
1) loop through the print routine X times
2) use PCL instead of NWP
3) or trust the user to remember that they need X copies of this form.

Yikes. Number 3 is definitely out for two reasons. We print directly to a dedicated printer and don't stop at the printer dialog in this case. I'll choose door number 1, I guess.

Thanks Doug.

-- Susan
Larry TIetz

Post by Larry TIetz »

Isn't picking the number of copies similar to the settings for which tray to use? (I forgot, but will need it soon). You select what you want and save the result in an environment variable, or something like that. Then you know what number corresponds to which tray for that printer. I would think you could do something similar for the number of pages to print. Or there should be some environment variable that is set.
gtisdale
Posts: 218
Joined: Sun Jun 07, 2009 7:54 am
Location: Concord, Massachusetts
Contact:

Post by gtisdale »

PCL of course would work if you don't have a "brain dead" printer. However, the COPIES in PCL does not collate your cpies, print thre page one thenthree page two etc. a bit of a pain.

What I do with invoces, that can run to more than one page and require multiple copies, and the number of copies varies with the client (yes I do still have some clients) and each copy needs a FOOTER saying which copy it is, is tho include a text file in the program directory that gets proced into the program as follows:

MAT COPIES$(4)
let copies$(1)="Incoice"
let copies$(2)="Customer Copy"
let copies$(3)="Remittance Copy"
let copies$(4)="File Copy"

To change the niumber of copies for any client is a simple change to the text file. Each copy gets a footer saying what it is, and the program just loops through the number of copies.

For A=1 to udim(copies$)
print the invoice
next a

or something like that.

FNGeorge
Susan Smith
Posts: 717
Joined: Sun Aug 10, 2008 4:24 am
Location: Southern California

Post by Susan Smith »

I'm not sure I follow what you're saying, Larry. I guess I figured since # copies is a very common parameter (and we programmers sometimes need to control this rather than let the user do it in some cases) that the PCL command in PRINTER.SYS would work for NWP as well. But it doesn't. To Gabriel's credit - or whoever wrote the documentation for printer.sys, the wiki DOES say that it's only for PCL. I guess I figured that there would be a PCL-like way to do it in NWP.

I'll do it in a loop instead I guess. I just got that working a few minutes ago.

-- Susan
Susan Smith
Posts: 717
Joined: Sun Aug 10, 2008 4:24 am
Location: Southern California

Post by Susan Smith »

Hi George,

Yes, this is how I did things before I started using NWP. I'll go back to that method for this project. I'm glad you explained about the collating in the PCL copies command. I didn't know about that, but it clarifies the possible reasons why ADS might not have wanted to port the PCL copies command straight to NWP. (Too bad - in my case, it was only a one-oage form.)

I just finished putting this routine in a loop and it's working now.

-- Susan
gordon
Posts: 358
Joined: Fri Apr 24, 2009 6:02 pm

Post by gordon »

I believe NWP ignoes the COPIES= parameter in OPEN statements. I have asked Dan about it. It hasn't been a priority, because the Microsoft API doesn't support it, so report processing time cannot be saved by having BR do it.

However, we are looking into it.

Also 4.20D supports a TYPE command that applies printer translations on the fly. So if you print to a display file you can then TYPE it to any printer.

e.g. TYPE PRT\PR_REPORT.RAW >PREVIEW:/HP4
gordon
Posts: 358
Joined: Fri Apr 24, 2009 6:02 pm

Post by gordon »

Well I've got good news and bad news.

THE GOOD NEWS IS THAT NWP ALREADY DOES IT RIGHT.

The bad news is that your fearless leader doesn't even know what the product does. (Of course you already knew that.)

=======================================

The reason NWP has no escape sequence for COPIES is that it is handled in the OPEN statement. It IS supported and it DOES collate.
Post Reply