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.

Count required amount of pages

Featured Replies

Hi folx

I have a file invoices with n invoice line, each being max 3 lines long.

How can I figure out how many pages I will need, and how can I manage this?

As far as I understand, printing will be from a layout of the invoice lines. But what else?

Thank you for your valued help.

Your question suggests that you are not familiar with certain FM features and techniques.

Yes, invoices are best printed from their child line items table. If each line item can be 3 lines long, then you need to make that field tall enough. However, you can use FM's Slide feature to remove white space as well as reduce the size of the body part.

Check out Sliding.

I think I understand your problem.

I use a script to:

count no of items in portal using global $$lines

set $$page to 1

Set $$pageof to 1

If $$lines < = lines on invoice (1-5)

print invoice

if $$lines < = next page of invoice (6-10)

set $$page to 1

set $$pageof to 2

print

set $$page to 2

set page of to 2

print

etc.

The portal must be set up to change initial rows and number of rows to print for each page.

IEW, are you printing multiple portals? Why? You should print from the line items table.

As for having Page 1 of 2 in a footer, all you need to do is Enter Preview, Go to Last Page, and set a global (gPages) to the Page Number. Then put Page ## or gPages in your footer.

  • Author

thank you for your help

with some testing, I managed to do something similar. but...

at the end of page one/two/(all but not the final one), I want a footer stating the sum of the lines on that page.

any chance to do that?

There is technique for end of page summaries (it's not straightforward). I'll see if I can find the thread. If "comment" sees this, perhaps he'll post a link to it, as I believe he's the person who created it.

End of section totals can be created using a trailing sub-summary. End of report, trailing grand summary.

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.