Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

Hi, I know my basic scripts but am far from being able to add all the permutations and combinations when users don't do exactly as you expect them to... but am super keen to learn!

Let me start here. I have a script that sets the print setup, enters preview mode and then takes the user to the print dialogue box. If the users presses 'cancel', filemaker shows 'Print has been cancelled. Do you wish to continue with the script'. I Users might be totally flustered with this dialogue. What do I need to add to my script in order to take them back to browse mode?

Thanks so much,

Posted

Is it necessary for users to have access to the print dialog box?

Could you not determine the print setup up in an earlier part of your script so that when the user has previewed what the report will look like they then have the option to print or to cancel?

Something along the lines of:

Start your script with Allow user abort [off] and Set error capture [on]

Gather the data for the report according to the criteria you set; set up report page numbers, etc

Go to the print layout

Enter preview mode [pause]

Show custom dialog - Print or cancel

If [get last message choice] = 1

Print

End if

Go to original layout

Enter browse mode

Posted

if you set error capture on, right after the print command that brings up the dialog you can do the following:

if [ Get ( LastError ) = 1 ]

Go to Layout [ original layout ]

Enter Browse Mode [ ]

Exit Script [ ]

End If

This topic is 4777 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
×
×
  • Create New...

Important Information

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