October 11, 201213 yr Newbies 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?
October 11, 201213 yr 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.
October 11, 201213 yr Author Newbies 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?
October 11, 201213 yr 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.
October 12, 201213 yr Author Newbies 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.
October 13, 201213 yr 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/
October 14, 201213 yr 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.
Create an account or sign in to comment