Subscribe Bookmark RSS Feed

Get a list of all open reports?

matt_p

Community Trekker

Joined:

May 25, 2012

Hello all,

I am trying to create a list of all reports that are opened from a JMP script.

I figure there might be a simple command for this but I have been back and forth through the scripting guide without finding much.

The only other idea that is coming to my head is to grab the current report, somehow grab that name, add it to the list, then close that report and grab the next report.

Thanks for any help!

-Matt

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

I am not aware of a simple command. Below is an attempt using the Window() function. However the resulting list includes any kind of window, e.g. data tables, that the script generates. To get only reports one need to filter out other types of windows.

nb=nitems(Window()); //number of windows before running script

//Actual script

New window("test1",textbox("test1"));

New window("test2",textbox("test2"));

//End of script

na=nitems(Window()); //number of windows after running script

// Build list of new windows

reportlist={};

for(i=0, i<=na-nb-1,i++,

  insertinto(reportlist, window(i)<<get window title);

);

Show(reportlist);

2 REPLIES
Solution

I am not aware of a simple command. Below is an attempt using the Window() function. However the resulting list includes any kind of window, e.g. data tables, that the script generates. To get only reports one need to filter out other types of windows.

nb=nitems(Window()); //number of windows before running script

//Actual script

New window("test1",textbox("test1"));

New window("test2",textbox("test2"));

//End of script

na=nitems(Window()); //number of windows after running script

// Build list of new windows

reportlist={};

for(i=0, i<=na-nb-1,i++,

  insertinto(reportlist, window(i)<<get window title);

);

Show(reportlist);

matt_p

Community Trekker

Joined:

May 25, 2012

Worked great for my application, thanks MS!!