February 13, 200125 yr Hi Does anyone know how I can conditionally print records? I mean, when the user is presented with the print dialog and presses the cancel button, how can my script handle this (e.g. EXIT SCRIPT)?
February 13, 200125 yr If you hit the cancel button on the Print dialog box while in a script, your script should drop down to the next step. Personally, I tried not to allow my users to cancel print job in a script. I use the no dialog option. What I do is to take them to a report review, and script a print option into the process. HTH [This message has been edited by WBlanchard (edited February 13, 2001).]
February 13, 200125 yr Use the script step "Allow User Abort (Off)" this will let people cancel out of print dialogs but stops the goofy "Cancel-Continue Script?" dialog that usually pops up and confuses users.
February 14, 200125 yr Author Thanks san Jose and Sydney. Unfortunately, hitting OK also drops down to the next step in my script. I have a routine that prints an invoice. After printing, the records are marked as printed, the reason being that reprints of the invoice have to be marked with COPY (by law). If the user decides not to print, the records still get marked. You may suggest adding a 'confirmation' routine, on the lines: "did the invoice print OK?", marking the records accordingly. However, the application prints to a print file, so the printing is 'asynchronous' anyway. I have a feeling I'm looking for an external function here, which, of course, I don't have. Any offers?
February 15, 200124 yr Have you tried using Error Capture (on) at the beginning of a pront script and (off) at the end. Then if the cancel button is pressed, it just closes the print funtion. Chris
February 16, 200124 yr Status(CurrentError)=1 indicates that the user cancelled the operation Status(CurrentError)=600 indicates a general print error Status(CurrentError)=603 indicates that the printer connection was lost. You can check for any of the 3 conditions to see if the print operation was unsuccessful. The error codes are listed in the Filemaker help file.
February 16, 200124 yr Maybe I'm missing something, but why not ask the user if they want to print BEFORE calling the print step (with a Show Message script step)? Supress the print dialog completely. -bd
February 16, 200124 yr That's what I was wondering too. It was actually suggested somewhere near the top of this topic.
February 16, 200124 yr Author Hi I will try out the status(currenterror). I think that's what I'm looking for - more interaction with the op system really. Thanks
Create an account or sign in to comment