Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Variable Print Copies

Featured Replies

So I have designed an inventory control system for our wharehouse and retail use. We are implimenting bar codes in our system, so I need to print out bar coded labels whenever product is received. Simply put, we need to be able to print the number of labels to match the quantity of merchandise received. So if we have received 4 T-Shirts, 4 labels need to print out. In the Inventory DB, there is only one record for that T-Shirt, but we need that record to print 4 times. Is there any way to print a variable about of copies based on a field value. We are using a PC, with FM 5.

Thanks

Are you printing one record at a time? If so, you can change the number of copies in the print dialog. If you are using a script attached to a button, edit the script. Clear the "Perform without dialog" option on the print script step.

Another approach

if you are printing from a script and don't want to have user intervention try this;

In your post you said you have a varible that contains the number of copies to print, and I presume the script as it is written prints just one.

Use the loop function around the print script step. This will loop through the necissary script steps, each loop prints out one record (page), then exit loop then it was performed that many times.

Get it?

Yet another option:

Have an additional FM related file that you populate with records whenever you want to print. So, if you want to print 20 labels, you would run a script that creates 20 related records in this file. Since these records would all relate to the item record in the main file, all the bar codes and other info would be identical. When you print you get 20 labels (one for each related record). At the end of the print script, delete the records. By expanding this technique a bit, you could print different numbers of labels for different products all at the same time.

Now, just one question. You said "wharehouse" which is obviously misspelled. Did you mean "warehouse" or "whorehouse"? If the latter, it's really cool that you sell T-shirts! What do they have printed on them? laugh.gif

Yet another option!!

The Looping print is good, but it sends a lot of print jobs to the printer. Sometimes it might be more appropriate to save multiple scripts that restore different print setups (different number of pages). This probably wouldn't make so much sense if a large quantity was common.

Eg:

If receivedQuantity = 3

perform script, RestorePrintQty3

Print

The RestorePrintQty3 script would be a single line: Page Setup [Restore]

  • Author

Thanks,

It looks like some these ideas may work for me. Please excuse my horrid spelling, the whorehouse is another project.

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.