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

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

Recommended Posts

Posted

This is driving me nuts. Have a main report area for general reports and two buttons that go to more specific report areas. I want each to open a new window. One works, the other doesn't and they're doing exactly the same thing.

Open new window from main report screen:

New Window [Name:"Report Two"; Top: 50; Left: 50]

Go To Layout ["Report Two" (Expense)]

Allow User Abort [Off]

Adjust Window [Resize to Fit]

Pause/Resume Script [indefinitely]

Close Window [Current Window]

in this window I click a button to run a report script:

Allow User Abort [Off]

Go To Layout ["Monthly Report" (Expense)]

Print Setup [Restore; No dialog]

Sort Records [Restore; No dialog]

Show/Hide Status Area [Lock; Show]

Enter Preview Mode [Pause]

Show Custom Dialog ['Print or Return"; "Print this report or return to Reports?"]

If [Get (LastMessageChoice) = 2

Print [Restore]

Enter Browse Mode []

Show/Hide Status Area [Lock; Hide]

Go To Layout ["Report Two" (Expense)]

Adjust Window [Resize to Fit]

Else

Enter Browse Mode []

Show/Hide Status Area [Lock; Hide]

Go To Layout ["Report Two" (Expense)]

Adjust Window [Resize to Fit]

End If

The first of the two opens the new window, I then can click on a report, view it, click on Continue to exit it and it takes me back to the original layout and I'm still in "pause" mode in the popup window. Here I click on a Close button to close window and am now viewing the main report window.

The second button does everything but when I click on "Continue" it takes me back to the popup window but now I'm no longer in pause mode, I'm in browse mode, the Close button is now useless as I'm not longer paused.

I've rewritten the scripts and only the first one works every time.

The only difference in these scripts is which layout they're going to but the one drops me into browse mode when I return to the popup.

Any thoughts?

Thanks,

r

Posted

Since no one has answered you yet I'll take a shot. Try moving your Pause and close window in to your If() statement. Just before endif. I use a lot of Freeze windows, new windows and close windows in my app and find I need to play around with the placement of the pauses and close windows til I get it right.

HTH

Posted

Thanks, I have tried that and added pause scripts through every step so I could see what it's doing but no change. These are identical scripts except for destinations, yet one works and one doesn't. It's got me pounding my head against the wall!

Posted

If the only difference between the two scripts is the layout you are viewing, I would guess the issue is the Current Script setting. There are 4 different options you can set for the currently running script when you define a button to Perform Script: Pause (default), Halt, Exit and Resume. I am guessing the two buttons have different settings. Most likely, you want both of them set to Pause.

Posted

Yep, I checked that on the main that kicks it off but not on the next one, those were the culprits. Geesh, it's always the simple stuff.

Much appreciate that clarity, the fog had me surrounded...

r

This topic is 6606 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.