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.

how do I dynamically invoke a Report script?

Featured Replies

Hi,

I hope this is the right place to post, i didn't see a 'reports' forum.

I'm wanting to have a reports_main layout, which displays a portral or list of script names in a table.

I want to display a nice description of the report, then allow my user to click on the row.

Once they click it i want to run a script, something like Launch_Report() and do a performScript on the field name in that row - and the contents of that field contain the script name which is in the current file.

doesn't look like I can set PerformScript's parameter on the fly.... is this possible?

Is there a design pattern for this kind of 'Report Main View' where your user can pick from a list of reports? Is there a reference or link related maybe?

thanks,

J__

There's a ScriptNames design function, but it returns the names of all the scripts in the file in a return separated list. You could parse it into multiple records, but it seems like it would be just as easy to type your own list.

There is no built-in way to dynamically run a script. So just make your own script runner:

If [ Get(ScriptParameter) = "Labels by Zip" ]

Perform Script [ Report - Labels by Zip ]

Else If [ Get(ScriptParameter) = "Labels by Name" ]

Perform Script [ Report - Labels by Name ]

Else If [ Get(ScriptParameter) = "List by Name" ]

Perform Script [ Report - List by Name ]

...

  • Author

Hi Ender,

thanks for the response. Ok, so there is no way to do that. Alright, i'll just type in the script. I was just wondering if there was some slick trick you guys might know about.

thanks,

sincerely,

J__

Since you're on a Mac, yes, you can do this easily with applescript.

  • Author

BruceR,

thanks for the response. Could you elaborate?

thanks,

J__

  • 3 weeks later...

i want to do the same thing for our vertical market app but can't use applescript for it. i want the user to be able to use the report/layout wizard to design a custom report, and then dynamically grab the name of the report and assign the running of it to a pre-existing button, because i want to wrap the default script the wizard makes in our main print/navigation script, and our users are not allowed to see scriptmaker menus.

it's seems almost doable in fm7 but i have yet to give it a shot. has anyone provided a custom report generator using the built-in wizard without opening the script menu and then leaving the user in preview mode?

Create an account or sign in to comment

Important Information

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

Account

Navigation

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.