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

how do I dynamically invoke a Report script?


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

Recommended Posts

Posted

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__

Posted

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 ]

...

Posted

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__

Posted

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

  • 3 weeks later...
Posted

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?

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