Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Freeze Window not working

Featured Replies

  • Author

I'm setting up a printing script and I don't want the screen flashing while I'm changing to the print layout, so I'm trying to use a Freeze/Refresh combo.

I have a main printing script ("Print") attached to a button with a script parameter of "invoice".


Allow User Abort [Off]

Set Error Capture [On]



If [Get(ScriptParameter) = "invoice"]

 Perform Script ["Print Invoice']

Else

 Print[]

End If




The Print Invoice script reads:


#Set the orientation to portrait

Perform Script ["Page Setup"; Parameter: "portrait"]

Freeze Window

Go to Layout ["print_invoice" (invoices)]

Print [Restore; No dialog]

Go to Layout [original layout]

Refresh Window[]

If I trigger my "Print" script from my button, I see the layout change to the print_invoice layout and back. Same thing if I call the "Print Invoice" script from the script menu or ScriptMaker.

I've tried playing with the placement of the Freeze/Refresh steps (putting them in the "Print" script surrounding the "Perform script" step) with the same results.

This is on FMDev 7.03, OS X 10.3.7.

Any ideas?? confused.gif

I'm setting up a printing script and I don't want the screen flashing while I'm changing to the print layout, so I'm trying to use a Freeze/Refresh combo.

I have a main printing script ("Print") attached to a button with a script parameter of "invoice".


Allow User Abort [Off]

Set Error Capture [On]



If [Get(ScriptParameter) = "invoice"]

 Perform Script ["Print Invoice']

Else

 Print[]

End If




The Print Invoice script reads:


#Set the orientation to portrait

Perform Script ["Page Setup"; Parameter: "portrait"]

Freeze Window

Go to Layout ["print_invoice" (invoices)]

Print [Restore; No dialog]

Go to Layout [original layout]

Refresh Window[]

If I trigger my "Print" script from my button, I see the layout change to the print_invoice layout and back. Same thing if I call the "Print Invoice" script from the script menu or ScriptMaker.

I've tried playing with the placement of the Freeze/Refresh steps (putting them in the "Print" script surrounding the "Perform script" step) with the same results.

This is on FMDev 7.03, OS X 10.3.7.

Any ideas?? confused.gif

  • Author

I'm setting up a printing script and I don't want the screen flashing while I'm changing to the print layout, so I'm trying to use a Freeze/Refresh combo.

I have a main printing script ("Print") attached to a button with a script parameter of "invoice".


Allow User Abort [Off]

Set Error Capture [On]



If [Get(ScriptParameter) = "invoice"]

 Perform Script ["Print Invoice']

Else

 Print[]

End If




The Print Invoice script reads:


#Set the orientation to portrait

Perform Script ["Page Setup"; Parameter: "portrait"]

Freeze Window

Go to Layout ["print_invoice" (invoices)]

Print [Restore; No dialog]

Go to Layout [original layout]

Refresh Window[]

If I trigger my "Print" script from my button, I see the layout change to the print_invoice layout and back. Same thing if I call the "Print Invoice" script from the script menu or ScriptMaker.

I've tried playing with the placement of the Freeze/Refresh steps (putting them in the "Print" script surrounding the "Perform script" step) with the same results.

This is on FMDev 7.03, OS X 10.3.7.

Any ideas?? confused.gif

Put the Freeze Window before the Page Setup script. Make sure there is no Refresh step in this sub-script.

Strictly speaking the Refresh Window step at the end is redundant: FMP refreshes the window anyway.

Put the Freeze Window before the Page Setup script. Make sure there is no Refresh step in this sub-script.

Strictly speaking the Refresh Window step at the end is redundant: FMP refreshes the window anyway.

Put the Freeze Window before the Page Setup script. Make sure there is no Refresh step in this sub-script.

Strictly speaking the Refresh Window step at the end is redundant: FMP refreshes the window anyway.

  • Author

Put the Freeze Window before the Page Setup script. Make sure there is no Refresh step in this sub-script.

Nope; I put the Freeze Window step as the first step in the "Print Invoice" sub-script and it still shows the layout changing. Same if I take it out of "Print Invoice" and put it in the master "Print" script.

EDIT: Here's the two scripts as they stand now:

Print:

print.png

Print Invoice:

print_invoice.png

EDIT: And the Page Setup sub-script

page_setup.png

  • Author

Put the Freeze Window before the Page Setup script. Make sure there is no Refresh step in this sub-script.

Nope; I put the Freeze Window step as the first step in the "Print Invoice" sub-script and it still shows the layout changing. Same if I take it out of "Print Invoice" and put it in the master "Print" script.

EDIT: Here's the two scripts as they stand now:

Print:

print.png

Print Invoice:

print_invoice.png

EDIT: And the Page Setup sub-script

page_setup.png

  • Author

Put the Freeze Window before the Page Setup script. Make sure there is no Refresh step in this sub-script.

Nope; I put the Freeze Window step as the first step in the "Print Invoice" sub-script and it still shows the layout changing. Same if I take it out of "Print Invoice" and put it in the master "Print" script.

EDIT: Here's the two scripts as they stand now:

Print:

print.png

Print Invoice:

print_invoice.png

EDIT: And the Page Setup sub-script

page_setup.png

I'm having the exact same trouble in Dev 7.03 & OSX 10.3.8. I've tried moving around the script steps, & even writing a temporary test script, but it always flashes the "print" layout when I call the print step. It's like the print step is forcing a refresh regardless of a previous freeze step.

I'm having the exact same trouble in Dev 7.03 & OSX 10.3.8. I've tried moving around the script steps, & even writing a temporary test script, but it always flashes the "print" layout when I call the print step. It's like the print step is forcing a refresh regardless of a previous freeze step.

I'm having the exact same trouble in Dev 7.03 & OSX 10.3.8. I've tried moving around the script steps, & even writing a temporary test script, but it always flashes the "print" layout when I call the print step. It's like the print step is forcing a refresh regardless of a previous freeze step.

  • Author

It's like the print step is forcing a refresh regardless of a previous freeze step.

I think this is the case. I have other scripts that use Freeze Window but don't print and they work as expected.

  • Author

It's like the print step is forcing a refresh regardless of a previous freeze step.

I think this is the case. I have other scripts that use Freeze Window but don't print and they work as expected.

  • Author

It's like the print step is forcing a refresh regardless of a previous freeze step.

I think this is the case. I have other scripts that use Freeze Window but don't print and they work as expected.

  • 2 weeks later...

Hello Peeps

Whenever you ask FM to print it ALWAYS switches the layout into preview mode, whether you want it to or not. This will cause a screen "flash" (actually its just a mode change but whos being picky!)

The work around is this...possibly

Script a variable to hold the current record number.

Enter Preview mode. (This causes FM to show the first record NOT the actual one you just clicked print on.)

Add a script step to goto the variable holding the current record number you applied in the first step.

Print (restore)

Enter Browse Mode

On my G4s and G5s there is no "flash"

(however Preview mode always defaults to 100% viewing - in gods name why??)

Lastly, if you want to be blatant, create a layout thats clearly for printing ie lots of high contrast areas and so the user expects a change of layout.

Last Effort?

Try inserting a Commit Records step immediately before the Print Step - ive not tried this but it may work (by forcing FM to update its fields).

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.