BookmarkSubscribeRSS Feed
sbiedrzycki

Occasional Contributor

Joined:

Apr 9, 2018

Hidden report unable to close

I have a script that queries a database and sorts my data prior to exporting a number of graphs to a powerpoint presentation.  The script appears to function properly the first time I run it however fails everytime after this.

 

I get the following error in the log that I believe is occuring on the sort that is done following the query.

"JMP cannot replace the existing table because there are report windows that depend on the previous ordering."

 

The sort is simply

homedt << Sort( By(:time), Order(Ascending), Replace Table);

 

The plots are Control Charts that are arranged in list boxes that are taken as pictures for clean exporting to the powerpoint.  None of these appear to have discrete 'windows' that need to be closed.  The script itself does not produce any visible windows when it runs (as intended).  I've tried every version of Close All() I could but the window list doesn't show any other windows or reports, hidden or otherwise, so I'm at a loss at what's preventing it from running.  Thanks for any help you can provide.

1 ACCEPTED SOLUTION

Accepted Solutions
danschikore

Staff

Joined:

Sep 21, 2012

Solution

Re: Hidden report unable to close

When reports are created that are not placed into a window, they are "owned" by the top-most JSL display box created.  Simply clearing the symbol would be enough to close the report.  In the example below, the script would fail at the second <<Sort command without the call to Clear Symbols():

 

dt = Open("$SAMPLE_DATA/Big Class.jmp");

dt << Sort( By(:height), Order(Ascending), Replace Table);
r1 = Platform(dt, dt<<Run Script("Bivariate"));
r1 << Save PDF("$DOCUMENTS/biv-height.pdf");
Clear Symbols(r1);

dt << Sort( By(:weight), Order(Ascending), Replace Table);
r2 = Platform(dt, dt<<Run Script("Bivariate"));
r2 << Save PDF("$DOCUMENTS/biv-weight.pdf");
Clear Symbols(r2);

 

2 REPLIES
danschikore

Staff

Joined:

Sep 21, 2012

Solution

Re: Hidden report unable to close

When reports are created that are not placed into a window, they are "owned" by the top-most JSL display box created.  Simply clearing the symbol would be enough to close the report.  In the example below, the script would fail at the second <<Sort command without the call to Clear Symbols():

 

dt = Open("$SAMPLE_DATA/Big Class.jmp");

dt << Sort( By(:height), Order(Ascending), Replace Table);
r1 = Platform(dt, dt<<Run Script("Bivariate"));
r1 << Save PDF("$DOCUMENTS/biv-height.pdf");
Clear Symbols(r1);

dt << Sort( By(:weight), Order(Ascending), Replace Table);
r2 = Platform(dt, dt<<Run Script("Bivariate"));
r2 << Save PDF("$DOCUMENTS/biv-weight.pdf");
Clear Symbols(r2);

 

Highlighted
sbiedrzycki

Occasional Contributor

Joined:

Apr 9, 2018

Re: Hidden report unable to close

That appears to have done the trick. Thanks!