Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5631 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi folks. I'm using FMPadv 9. I need to print a group of documents. I need a variable number of copies of each document - for instance it might be 4 copies of doc 1, 2 copies of doc 2, just one copy of doc 3 and a dozen copies of doc 4. So it's kind of a print queue.

Is there any way for the print dialogue to be scripted to print a certain number of copies? In the print dialogue (it's an Epson C1100) I can't enter a script variable - it only accepts numbers.

As it stands I've been scripting so a loop sends a command to print one copy of doc 1 four times in a row, then one copy of doc 2 twice over, etc etc - but the (sometimes) huge number of single print commands can overload the printer.

It would be so much easier if I could just specify the number of copies. Anyone know a way? If it's not possible in 9, is it something that is possible in FMP10?

Posted

If the number of copies for each doc changes, then I don't see how this is scriptable. You certainly could show the print dialog and have the user enter the #copies, instead of looping.

If you don't show the dialog in the Print script step, it'll remember the number of copies entered, but it's hard-coded to the number remembered.

Posted

I need to print a group of documents.

I am not sure what exactly you mean by "documents" here. Usually Filemaker prints its own data. Unfortunately, the number of copies must be hard-coded into the Print[] step - but see:

http://fmforums.com/forum/showpost.php?post/296275/

Posted

Well, I'm not sure what the proper technical name would be. To me, "Document" is a general term - perhaps you're thinking of a .doc Word file?

I'm printing a letter, text generated in FMP. It's not a 'report' as it's not got a found set. I use "document" because it's a broader, more all-inclusive term than "letter" (which implies an address), but I could avoid the term if it means something else in FMP.

Posted

To me, "Document" is a general term - perhaps you're thinking of a .doc Word file?

LOL, it doesn't matter what I am thinking - the important thing is what do you mean. In any case, if you are printing Filemaker data, the post I linked to should be useful to you.

Posted

Thanks, but I can't see how. It seems to be about different ways of arranging for FMP to send a series of "print one copy" commands. I have no problem with that side of things - Im using a loop similar to the second poster in the thread. The problem is as the posters say - not being able to send a print command saying "print x number of copies", where x may vary.

One thing just occurred to me though - maybe I can save several sets of print dialogue and then use a conditional to activate the appropriate one. I don't think I'm ever going to need more than 10 copies, so it would just mean 10 sets of print dialogue. I'll give it a go - but I've seen a few other posts complaining of the print settings 'reverting'.

Posted

I was going to suggest If ElseIf, etc. using perhaps a global #of copies, but that would be limiting. However, you could ask the user #copies and then loop that many times.

Posted

It seems to be about different ways of arranging for FMP to send a series of "print one copy" commands

No - it's sending a series of "print one copy", "print two copies", "print four copies", "print eight copies" etc. commands, which together add up to the requested number of copies.

For example, to print 10 copies, it would cue two print commands: "print two copies" and "print eight copies".

Posted

No - it's sending a series of "print one copy", "print two copies", "print four copies", "print eight copies" etc. commands, which together add up to the requested number of copies.

For example, to print 10 copies, it would cue two print commands: "print two copies" and "print eight copies".

Ah, I understand! That is helpful - answers my question about being able to have several different print dialogues, each with different numbers of copies. Since I'm not dealing with large numbers, should be fine to just have 10 dialogues covering 1 copy to 10 copies.

Having user input for the number of copies defeats the point - the idea is to have a queue - to be able to print all the finished letters while I go and do something else.

Posted

Since I'm not dealing with large numbers, should be fine to just have 10 dialogues covering 1 copy to 10 copies.

Possibly, but using an exponential series is much more efficient. I also don't understand why you need multiple dialogs - all that's needed is the final number of copies, the rest is automatic.

Having user input for the number of copies defeats the point - the idea is to have a queue - to be able to print all the finished letters while I go and do something else.

I don't understand this either. The number of copies has to come from somewhere. If the user doesn't input this number, where it will come from?

Posted (edited)

Each letter has one addressee and a certain number of copies to other people. So if no people copied in, 1 copy printed. If 4 people copied in, 5 copies need to be printed. The letter has a field that calculates the number of copies to be printed, but it will be different for each individual letter.

So I might have 5 letters completed, and I want to print them all, but each letter might have a different number of copies needed, depending on how many people are to receive copies. I don't want to manually enter the number of copies - that's already been calculated in creating the letter, since the user has determined who is to receive copies of the letter. It needs to be automatic.

I'm not too concerned with efficiency of code (a conditional with 10 outcomes isn't all that clumsy anyway) - what I'm more interested in is reducing the absolute number of print commands to the printer, since it has a tendency to get overloaded easily if it receives too many commands in quick succession. So in the situation of needing 5 copies, I agree it might be more elegant code to send a "print 4" and a "print 1", but it's easier on the printer if I can send a single command "print 5".

I'll give it a go and let you know how it goes.

Edit: my use of the word "dialogue" might have been confusing. I don't mean dialogue with the user. I mean the print setup command - dialogue with the printer. So one print setup for "Print 1 copy", another identical dialogue but with "2" in the number of copies, etc - a bit like the way your example has separate print dialogues for print 1, print 2, print 4, print 8, and then the conditional selects which print dialogues to use.

Edited by Guest
Posted

If there is a field that holds the total number of copies to be printed, then the script can run with no further input from the user. It has a number of Print[] steps with hard-coded number of copies, and it calculates which of these to run in order to get the required number of copies (note that each step is wrapped in a If[] block). You can print any number of copies between 1 and 15 with only 4 steps.

This topic is 5631 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.