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.

Multiple Reports Same Script

Featured Replies

Hello,

I am new to FM and I need to develop an application that produces multiple reports from the same data.

I have developed two layouts that will give me the results I need. When I run the script it stops on the first layout and won't proceed to the second layout.

Ultimately, after both layouts have been run I need the combined results to be faxed together that is why I need them to be automated in the same script.

If I am going about this wrong please set me straight.

Attached is the script I have so far:

The FaxIt Report merely takes the first and last names, orderid and date and places them in a list format and the FaxIt report lists the details of those orders and other fields additionally. Both reports use the same data that is imported daily.

By the way, in my script I delete all records initially because each time I run the script it is a whole new set of data.

Any help will be greatly appreciated.

Randal

FMScript.pdf

Looks like you need to add Print[] script steps for each layout you want printed.

  • Author

Thanks for the reply. However, I believe I must be doing something wrong concerning your suggestion.

I added a print step for both layouts and then finally for the one that wasn't showing in the print preview. Either way I only get the last layout available to be faxed.

Attached is my latest script.

Thanks,

Randal

FMFaxIt.pdf

It looks like it should give you a print dialog and allow you to print whatever layout you have up when the script is run, then it switches to the "FaxIt" layout and prompts to print that (the "Faxit Report" layout is essentially ignored).

  • Author

It does do what you are saying. However, is there anyway to get it to produce both reports in the same batch so that when I choose print fax the reports are all grouped together?

Having them all together permits me to script the entire operation in the same script. Once this script is developed I need to develop a runtime module to send to a windows user.

My attachments show I tried calling the FaxIt script from the other script located on Fax112006.pdf

My latest change doesn't seem to produce both reports either.

Please tell me how to get both reports to print out in the same operation.

Thanks,

Randal

Fax112006.pdf

FaxIt.pdf

What you have should print both layouts one after the other. There will necessarily be two print jobs (one for each Print[] step). I don't think there's a way around that.

BTW: Your current scripts could be shortened and get the same result using:

Delete All Records

Import Records [ No Dialog ]

Sort Records [ Restore: by orders Converted::OrderID; orders Converted::Stock No.; No Dialog ]

Go to Layout [ Faxit Report ]

Print [ Restore ]

Go to Layout [ Faxit ]

Sort Records [ Restore: by orders Converted::OrderID; No Dialog ]

Print [ Restore ]

  • 1 month later...
  • Author

Hello,

I was taken away from this project until now. So, please forgive me for not thanking you for all you have done.

I tried your script you suggested but when I use the Print command as a fax PDF it won't keep the settings for the fax. I have tried saving it as a preset but it still just wants to print to the printer and not to a fax. Do you have any ideas?

Also, I had to add in the "Enter Browse Mode" statement because it wasn't showing all the transactions/record without adding that statement.

Is there some other way to control the fax portion in the script?

Thanks,

Randal

  • Author

I meant to say "Enter Preview Mode" instead of "Enter Browse Mode."

Changing it to the Preview mode it shows the reports on my screen without the Print steps.

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.