April 21, 20169 yr 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: 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. 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. 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 April 21, 20169 yr by LaRetta added notation and clarified I planned to loop the pages.
April 22, 20169 yr 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. :-)
April 22, 20169 yr 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.
April 23, 20169 yr 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 April 23, 20169 yr by LaRetta
April 23, 20169 yr 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?
April 23, 20169 yr 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