cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
matt_p
Level II

Get a list of all open reports?

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
ms
Super User (Alumni) ms
Super User (Alumni)

Re: Get a list of all open reports?

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);

View solution in original post

2 REPLIES 2
ms
Super User (Alumni) ms
Super User (Alumni)

Re: Get a list of all open reports?

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
Level II

Re: Get a list of all open reports?

Worked great for my application, thanks MS!!