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

Sliding and printing issues.


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

Recommended Posts

Posted

I am having a problem with a layout that I am using as a contract. The layout is "Stock" 3 pages long but when in preview mode slides up to anywhere from

1-1/2 to 3 pages in length. It does this because I have a series of large text fields that shrink to fit the text within them.

I have inserted a page numbering script that displays the page numbers as

"Page 1of3". The numbering system works great!

Here is my problem. The layout automatically wants to print 3 pages even if the last one is blank because that is how long the body of the layout is. My specialized numbering system doesn't jive when the last page of the contract says "Page 2of3".

This is the conversation I envision with my clients.

Client: "Hey Matt we received your contract, your service looks like it would fit our needs perfectly and your price is just below the competition's."

Matt: "Great! just sign and return it and we will get back to you with a start date and schedule".

Client: "Well we would but you have only given us 2 pages of a 3 page contract! What are you trying to pull Mr. Strouss? Do you think we are idiots? I can assure we are not! We have decided to go with the competition because of your contractual issues."

Matt: "AAAHHHHHHHHH"!!

Now this may be a slight exageration. My customers tend to be very nice people as a whole. I do however need to get this problem resolved. Why won't the footer and body of the layout slide with the rest of the document?

Posted

I use this method to print all my reports.

Required:

- one global field "Pageof#"

- one script to set the page number - "Set Page of #"

- one script for each printing setup (e.g. paper size, orientation, and current records or records being browsed) - "Print Setup - Letter, Portrait, Records Being Browsed"

- one script for the report desired - "Print My Report"

- on the print layout add "Page ## of <<Pageof#>>"

"Set Page of #" script

Freeze Window

Go to Record/Request/Page [Last]

Enter Preview Mode []

Set Field ["Pageof#", "Get(PageNumber)"]

Go to Record/Request/Page [Previous]

Enter Browse Mode []

"Print Setup - Letter, Portrait, Records Being Browsed"

Freeze Window

Print Setup [Restore, No dialog]

Perform Script [sub-scripts, "Set Page of #"]

Print [No dialog]

Set Field ["Pageof#", """"]

"Print My Report" script

Freeze Window

Enter Browse Mode []

Sort [Restore, No dialog]

Go to Layout ["Print Report"]

Perform Script [sub-scripts, "Print Setup - Letter, Portrait, Records Being Browsed"]

Go to Layout [original layout]

I use FM Pro 5.5 with this method to an over 99% success. (It will on occasion fail because the text size FileMaker reports and the text size actually printed vary.)

Posted

In your Set Page of # script, you should Enter Preview Mode before Go to Record/Request/Page [Last]. If you go to the last record in Browse Mode and then Enter Preview Mode, you still start on the first page. Also, there is no reason to Go to Record/Request/Page [Previous], but you may want to Go to Record/Request/Page [First]. And I wouldn't Enter Browse Mode again before printing, especially if you have any subsummary parts in the layout, unless you don't want them to print correctly. I don't think you would want to Freeze Window before the Print Setup or Go to Record/Request/Page [Last] steps either, since you've already done that at the beginning of the Print My Report script. Finally, you don't need to Enter Browse Mode at the beginning of the Print My Report script. Sorting works fine in Preview Mode. Find Mode is the only one you need worry about, but if you are clicking a button to run the script, you should be checking whether you're in Find Mode first, and then Halting or Exiting the script.

Posted

Thanks for the scripts. Now preview mode shows all of the records in the table in 6 pages. There are only 3 and they are all 2 pages long. It only prints the 1 record but the page numbers show 1of6 and 2of6. I had a little trouble with the sort in the "print My Report" step. In order for it to show "Sort [Restore, No dialog]" I have to select a field. Is that right.

As well, What does this do """"? in the "print Setup" script under Set Field. It won't let me enter that calculation. Filemaker automatically changes it look like this """".

What does the "Freeze Window" script step do?

Here is my scripting I must be doing something wrong.

"Set Page of #" script

Enter Preview Mode []

Go to Record/Request/Page [Last]

Set Field ["TotalPages", "Get(PageNumber)"]

Go to Record/Request/Page [First]

"Print Setup - Letter, Portrait, Records Being Browsed"

Print Setup [Restore, No dialog]

Perform Script [sub-scripts, "Set Page of #"]

Print [No dialog]

Set Field ["TotalPages", """"]

"Print My Report" script

Freeze Window

Sort [Restore, No dialog]

Go to Layout ["PacconEstimate"]

Perform Script [sub-scripts, "Print Setup - Letter, Portrait, Records Being Browsed"]

Go to Layout [PacconEstimate]

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