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

Listing two fields from a find in sequence for a invoice print

Featured Replies

Hello there, I found out this guide on how to have a find based on "select" records, it worked very good, now I want to have a print layout that shows two fields from the selected records in sequence, lets say I selected records 1,2 and 3, and I want to invoice to show the amount due for those records so it should print something like this:

 

"Hello there, you must pay for the orders 1( 50$), 2(30$), 3(40), thank you."

I can get that said script to go to a print layout but will list the records in list view one under the other, how to line those one after the other?

 

Thank you very much once again!

  • Author

I've got a layout that list the results from those two fields in line but using the print setup, so it will be "almost" fine in print view but in layout view they still show one under the other.

First, I don't see what does the link have to do with the problem. You want to aggregate values from the found set into a single sentence - how the found set was created is irrelevant to the issue.

 

Now, the simple way to print your list would be to put the opening segment "Hello there, you must pay for the orders:" in a leading grand summary part, followed by a body part with the fields, and closed by a trailing grand summary part containing the closing segment. This would give you a print out in the form of:

 

Hello there, you must pay for the orders:

   1  ( 50$)

   2  (30$)

   3  (40)

thank you.

 

I would urge you to adopt this format, because you rate yourself as a beginner and the alternative is not simple at all.

 

If you must have the format you show, I would suggest you use a global field and populate it by a script (this can be a part of the same script you use for finding the records and printing them). After finding and sorting the records, do:

Go to Record/Request/Page [ First ]
Loop
  Set Variable [ $print; Value:$print & Yourtable::Firstfield & " ($"  & Yourtable::Secondfield  & "), " ]
  Go to Record/Request/Page [ Next; Exit after last ]
End Loop
Set Field [ Yourtable::gPrintout; "Hello there, you must pay for the orders " & $print & "thank you." ]

In order to print the global gPrintout field only once, place it in a grand summary part (you probably won't need the body part for this layout at all).

 

 

Note:

You mentioned an invoice, but this is not like an invoice at all: normally, an invoice has not only several items, but also a parent record for fields that are common to all the items. In the situation you describe, the grouping is done ad hoc and - for example - you have no place to record the fact that you have sent the above reminder.  EDIT: I see that you are addressing this issue in your other question.

  • Author

The weird thing is how FM only shows the records as column on layout mode but allow you to print as a line, the only thing I was having issues with the line is how to get a propper format with line breaks and ponctuation, they could allow us to see the layout the same way it shows in print view, just to make easier to line up the extra text and or art we may want to use.

 

As those prints will work as simple payment confirmation the only two fields of info we must show are Record ID (that are service order ID) and ammount due, it is a very simple service store and the clients are other companies that never actualy asked for those payment reports, I am doing it so they can have better control. Maybe having more info for every record like what service was done could help but I am trying to keep the paper as small as possible. 

Thanks again!

Edited by Morenomdz

I am afraid I didn't understand anything from what you said, esp. not this part:

 

 

The weird thing is how FM only shows the records as column on layout mode but allow you to print as a line

 

I am aware of no such possibility.

  • Author

On the layout setup you can set it to list the field contents in X number of columns, showing two fields RecordID and value with three results found will print like this:

 

1115 R$60.00 , 1118 R$100.00 1120 R$30.00

 

But the layout still shows all records in a single column it only goes to distribute to multiple columns when in print view, it is just a quality of life option but would be good do display the right formating on layout view as well.

Create an account or sign in to comment

Important Information

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

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.