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

How to stop blank pages from printing when field is empty


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

Recommended Posts

  • Newbies
Posted

Situation--in a found set of records:

We have integrated bottle labels on our invoice. For each record, page one includes two bottle labels, colors #1 and #2, page two includes bottle labels color #3 and #4. Not every customer orders colors #3 and #4 so we only need to print page one for those customers.

Question:

Does anyone know how we can stop page two from printing if the color #3 and #4 fields are empty?

Posted

I'm not sure about Windows. On a Mac OS you can specify options, including printing only one page, on the "Print" script step. So I'd make a short script:

If (IsEmpty (Color#3) OR IsEmpty (Color#4))

Print (Restore options; No dialog) // Specify 1 page

Else

Print (Restore options; No dialog) // Specify all pages

End If

And then, if you are doing this for multiple records, you'll want to enclose this in a loop which prints each record one by one.

  • Newbies
Posted

Thanks! I tried you're suggestion but I can't get it to work in Windows. It still wants to print both page one and two even if the fields in page two are empty. Anyone else have any ideas?

Posted

I believe this could be a lot easier if your invoice had line items. Then you can print only items actually ordered - using exactly as many pages as it takes.

  • Newbies
Posted

It does have line items. Page two only contains the fields for colors #3 and #4 "if" a customer orders those colors, otherwise the fields and the page are completely blank.

I need to figure a way to tell Filemaker "not" to print page two if these fields are empty. Matthew F's suggestion seemed like it would work, but it doesn't in Windows.

Posted

I am afraid we are not on the same page (pardon the pun). If your invoice has line items, then this question should not come up.

Have a look at the demo posted here - esp. the PrintOneInvoice script and the layout it uses:

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

Posted

It does have line items. Page two only contains the fields for colors #3 and #4 "if" a customer orders those colors, otherwise the fields and the page are completely blank.

I need to figure a way to tell Filemaker "not" to print page two if these fields are empty. Matthew F's suggestion seemed like it would work, but it doesn't in Windows.

Make multiple copies of the layouts, each with the fields missing as required. When printing, script the selection of the correct layout.

This topic is 4423 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.