![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
In FMP 8, I go to a layout which is for print only, set preview mode with pause. The user is to decide whether to continue (to print) or abort. If he does decide to abort, he ends up in the print layout. I'd prefer he didn't. Can I capture this abort in the script? |
#4
| |||
| |||
|
|
In article <g94rp1huk5haqjkdm77i0p14kphnlpf843 (AT) 4ax (DOT) com>, Christoph Kaufmann <clk (AT) freesurf (DOT) ch> wrote: In FMP 8, I go to a layout which is for print only, set preview mode with pause. The user is to decide whether to continue (to print) or abort. If he does decide to abort, he ends up in the print layout. I'd prefer he didn't. Can I capture this abort in the script? You can't actually "capture" the abort click, but you can remove that option by using the Allow User Abort [Off] script command. This means the user can't abort the script and you can use a custom message window as others have suggested to ask if they want to print it or not. Basically your script becomes: Go To Layout [PrintLayout] Allow User Abort [Off] Enter Preview Mode [Pause] Show Message ["Do you want to print?", "Yes", "No"] If [Get(Current Message Choice) = 1] Page Setup [Restore, No Dialog] Print [] End If Go To Layout [DataEntryLayout] The Allow User Abort command automatically turns on when the script ends. You might want to use the Print [No Dialog] command instead of just Print [], but it's usually best to allow the user to specify what pages and how many copies they want to print, etc. |
#5
| |||
| |||
|
|
Basically your script becomes: Go To Layout [PrintLayout] Allow User Abort [Off] Enter Preview Mode [Pause] Show Message ["Do you want to print?", "Yes", "No"] If [Get(Current Message Choice) = 1] Page Setup [Restore, No Dialog] Print [] End If Go To Layout [DataEntryLayout] |
|
the Allow User Abort option is better since that stops users being able to switch layouts, etc. manually. and they HAVE to finish previewing the report layout. |
#6
| |||
| |||
|
|
Helpful Harry <helpful_harry (AT) nom (DOT) de.plume.com> wrote: Basically your script becomes: Go To Layout [PrintLayout] Allow User Abort [Off] Enter Preview Mode [Pause] Show Message ["Do you want to print?", "Yes", "No"] If [Get(Current Message Choice) = 1] Page Setup [Restore, No Dialog] Print [] End If Go To Layout [DataEntryLayout] I couldn't get to work that script properly, even though I copied all the steps the script would simply halt in the print layout. |
![]() |
| Thread Tools | |
| Display Modes | |
| |