Jump to content

Printing one page at a time


LaRetta
 Share

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

Recommended Posts

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.
Link to comment
Share on other sites

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.  :-)

Link to comment
Share on other sites

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.

 

 

  • Like 1
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This topic is 2254 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
 Share

×
×
  • Create New...

Important Information

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