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

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

Recommended Posts

Posted

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

Posted

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

Posted

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

Posted

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.

Posted

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.

Posted

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.

Posted

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

Posted

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

Posted

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

Posted

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.

Posted

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.

Posted

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.

Posted

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.

Posted

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.

Posted

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...
Posted

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.

Posted

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).

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