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.
Juggernaut

Printing one page at a time

Featured Replies

I have a list view with several records in a found set.  TWO records always exactly fit per page.  I know the total pages by going to preview mode then going to last page and setting $numPages variable and my plan was to pause for the user to insert special card stock then print page 1 (which would be page $i from the loop) and repeat for all pages.  One page needs to be fed at a time because the printer will not pick it up from the feeding tray it needs to be done individually.

The problems are:  

  1. If I try to set the print options, it insists on specifying a printer and I do not want to.  I want the person to select the printer or use default.
  2. I can't specify the page to print by using a variable, in this case $i because it is hard-coded in Print. I can't create multiple hard-coded Print[] steps with different page in each because I cannot guarantee how many total pages will be involved.
  3. I want it to pause after the first page, print that page, have the person confirm it printed correctly and only then set a printDate in those TWO records for that page.

I suspect I'm approaching this issue completely wrong.  Maybe I need to isolate TWO records at a time and print the found set, set them as printed, maybe by opening a new window in which to manipulate the record set.  Ideas appreciated.

added: after step 3, it should re-loop and print again if the user says the print jammed or failed.  

Edited by LaRetta
added notation and clarified I planned to loop the pages.

  • Author

I believe what I can do is set the script to always print page 1.  Then after printing and setting those records, omit them and repeat.  I'll try that in the morning.  :-)

Printing with FileMaker has been a less than desirable task for me.  Especially with PCs - thankfully the Mac side is a bit more reliable.  

I was going to suggest something very similar to your 2nd post.  Instead of finding and omitting the 2 records, is to use the found set, and Go To Record x+2 with each successful page print.  This way you won't have to find the set again if something messes up.  

I can't offer anything good with the 1st issue.  There are plugins available that supposedly help with this, but I'm unaware of their reliability.

 

 

  • Author

Thank you, Brent, I appreciate the idea!

It is amazing how much clearer one can think after a good night's sleep. I wrote this quite quickly and clearly.  Here is the gist of the script in case it helps others in the future or if anyone has better suggestions:

# produces two records per sheet stock
New Window [ ]
Go to Layout [ “halfSheetCardStock” ] 
Go to Record/Request/Page [ First ]
Loop
Exit Loop If [ not Get ( FoundCount ) ]
Print [ Records being browsed; Pages: 1 to 1; Orientation: Portrait; Paper size: 8.5" x 11" ]
Show Custom Dialog [ Message: "Did it print properly?"; Buttons: “Yes”, “No” ] 
    If [ Get ( LastMessageChoice ) = 1 // yes ]
    Set Field [ Notices::actionDate; Get ( CurrentDate ) ] 
    Omit Record
    Set Field [ Notices::actionDate; Get ( CurrentDate ) ] 
    Omit Record
    End If 
End Loop
Close Window [ Current Window ]

Added:  BTW, I just left the print dialog open so the User could specify the printer.

Edited by LaRetta

2 hours ago, LaRetta said:

Added:  BTW, I just left the print dialog open so the User could specify the printer

Nice touch. Does this work on Windows too?

  • Author

Hi Lee,

I would assume it works same on Windows; it simply allows User to handle the print settings.  I would like to lock down and prohibit ability of changing any settings beside the printer itself but, like Brent mentioned, I too find print setup awkward and we do not want to use a plugin here.  

It is possible that, if the User specifies multiple pages that the script would fail to set the subsequent records but I am unsure if there are ways of protecting further from tampering.

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.