<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Report Window Doesn't Close in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Report-Window-Doesn-t-Close/m-p/52120#M29557</link>
    <description>I figured out that if you put a button in the report window that closes that window and continues with more script, the window that contained the button doesn't fully close. But if you place a button outside the report window that does the exact same script, then everything works fine. I am not exactly sure why that is and I had to change my script a little to compensate, but it now works fine in the end.</description>
    <pubDate>Tue, 27 Feb 2018 10:52:37 GMT</pubDate>
    <dc:creator>frankeberle</dc:creator>
    <dc:date>2018-02-27T10:52:37Z</dc:date>
    <item>
      <title>Report Window Doesn't Close</title>
      <link>https://community.jmp.com/t5/Discussions/Report-Window-Doesn-t-Close/m-p/51553#M29222</link>
      <description>&lt;P&gt;I have a script that I am trying to set up that when run, it pops up an interactive GUI that looks like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 222px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/9385iCC39218FF02EB4F0/image-dimensions/222x152?v=v2" width="222" height="152" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I can populate the lot number and the only button that works at the moment is the "CPL Screen" one.&amp;nbsp; I click it and it produces a report of whether the wafers in that lot passed screening limits.&amp;nbsp; If there are error codes or super high values within the data a button box is added to the report asking if the user wants to have those values removed and the screening done again.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture1.JPG" style="width: 541px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/9386i93EF92C87A6AFC9D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture1.JPG" alt="Capture1.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I have set up the button to where it is supposed to close the current report window and data table associated with it and rerun the same "CPL Screen" as done in the beginning after removing the bad data.&amp;nbsp; The only problem is that when I click the rerun button the original window doesn close and the report doesn't finish.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can physically go into the script and highlight the code that is connected to the button and the script runs fine.&amp;nbsp; It only doens't work if I actually click the button.&amp;nbsp; Here is what the Window list looks like the when it is the first time through:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture2.JPG" style="width: 298px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/9387iE1469F79006FA5A2/image-dimensions/298x224?v=v2" width="298" height="224" role="button" title="Capture2.JPG" alt="Capture2.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Here is what it looks like when i click the rerun button:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture3.JPG" style="width: 235px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/9388i291D986BDFFED93C/image-dimensions/235x170?v=v2" width="235" height="170" role="button" title="Capture3.JPG" alt="Capture3.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It seems that the original report doesn't close prior to the new one opening.&amp;nbsp; I am stumped considering I can phyically run the same code and everything works.&amp;nbsp; The following is a suedo flow chart of what the script is doing:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="Capture4.JPG" style="width: 508px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/9389i1E6125E4616E7A1C/image-dimensions/508x349?v=v2" width="508" height="349" role="button" title="Capture4.JPG" alt="Capture4.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be much appreciated&lt;/P&gt;</description>
      <pubDate>Mon, 19 Feb 2018 20:26:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Report-Window-Doesn-t-Close/m-p/51553#M29222</guid>
      <dc:creator>frankeberle</dc:creator>
      <dc:date>2018-02-19T20:26:59Z</dc:date>
    </item>
    <item>
      <title>Re: Report Window Doesn't Close</title>
      <link>https://community.jmp.com/t5/Discussions/Report-Window-Doesn-t-Close/m-p/51587#M29247</link>
      <description>After more fiddling, it appears that the script isn't running in the sequence I had thought it should. I thought the script would execute things sequentially, as in line 10 would be executed then move on to line 11 and execute that. I found that even though I have the line of report &amp;lt;&amp;lt; close window() on a line at the beginning of the rerun portion, the script doesn't fully execute that line until the script is fully finished. The window will become hidden but not fully closed until the new window is opened. Since I have a &amp;lt;&amp;lt;onclose() additive to the report window to close the data table that makes the histogram the rerun report gets the histogram initially but then the first report fully closes and it closes the data table for the histogram, removing the histogram from the second report.&lt;BR /&gt;Any ideas as to why JMP is doing this and what I can do to mitigate it? I forgot to mention that I am running JMP 12.</description>
      <pubDate>Tue, 20 Feb 2018 11:30:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Report-Window-Doesn-t-Close/m-p/51587#M29247</guid>
      <dc:creator>frankeberle</dc:creator>
      <dc:date>2018-02-20T11:30:14Z</dc:date>
    </item>
    <item>
      <title>Re: Report Window Doesn't Close</title>
      <link>https://community.jmp.com/t5/Discussions/Report-Window-Doesn-t-Close/m-p/51589#M29249</link>
      <description>&lt;P&gt;Popping open a window in JMP does not automatically stop the processing of your script.&amp;nbsp; One either has to declare the window to be a "Modal" window or embed the code to be run into the objects within the window, so they are not run until a user clicks on a button, or makes a choice in a combo box, etc.&lt;/P&gt;
&lt;P&gt;So my guess, is that your JMP code continues processing while you have your window open, and you are thinking the processing is waiting your the user input prior to continuing.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2018 12:20:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Report-Window-Doesn-t-Close/m-p/51589#M29249</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-02-20T12:20:31Z</dc:date>
    </item>
    <item>
      <title>Re: Report Window Doesn't Close</title>
      <link>https://community.jmp.com/t5/Discussions/Report-Window-Doesn-t-Close/m-p/51591#M29251</link>
      <description>&lt;P&gt;The code to add the button to the report window is thus:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;if(errors_exist == 1 | large_value == 1,
error_box &amp;lt;&amp;lt; append(Button box("Remove Erroneous Data and Rerun Analysis",redo_analysis))
)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The code for redo_analysis is as follows:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;redo_analysis = expr(//if the user wants to eliminate error codes or large data values need to redo the screening and remove the issue points
close(dt_screen_results, nosave);
re_run = 1; //boolean flip to not have the script pull data from the database again
screen_result_window &amp;lt;&amp;lt; close window;
//wait(5);
column(dt_lot, "Screen Results") &amp;lt;&amp;lt; set selected(1);
dt_lot &amp;lt;&amp;lt; delete columns();
if(errors_exist == 1, //deletes the error code rows
dt_lot &amp;lt;&amp;lt; selectrows(error_rows)
);
if(large_value == 1,//deletes the large value rows
dt_lot &amp;lt;&amp;lt; selectrows(large_values)
);
dt_lot &amp;lt;&amp;lt; delete rows()
CPL_screen
//window(char(lot_num &amp;lt;&amp;lt; get text) || " CPL Results Summary") &amp;lt;&amp;lt; close window;
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If I push the button in the report the issue persists. If i don't push the button but highlight redo_analysis in the script and run that portion everything works fine.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2018 22:48:01 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Report-Window-Doesn-t-Close/m-p/51591#M29251</guid>
      <dc:creator>frankeberle</dc:creator>
      <dc:date>2018-02-27T22:48:01Z</dc:date>
    </item>
    <item>
      <title>Re: Report Window Doesn't Close</title>
      <link>https://community.jmp.com/t5/Discussions/Report-Window-Doesn-t-Close/m-p/52120#M29557</link>
      <description>I figured out that if you put a button in the report window that closes that window and continues with more script, the window that contained the button doesn't fully close. But if you place a button outside the report window that does the exact same script, then everything works fine. I am not exactly sure why that is and I had to change my script a little to compensate, but it now works fine in the end.</description>
      <pubDate>Tue, 27 Feb 2018 10:52:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Report-Window-Doesn-t-Close/m-p/52120#M29557</guid>
      <dc:creator>frankeberle</dc:creator>
      <dc:date>2018-02-27T10:52:37Z</dc:date>
    </item>
    <item>
      <title>Re: Report Window Doesn't Close</title>
      <link>https://community.jmp.com/t5/Discussions/Report-Window-Doesn-t-Close/m-p/52281#M29596</link>
      <description>&lt;P&gt;The button and all of its properties, including its script, is a child&amp;nbsp;of a&amp;nbsp;display tree. The display tree is contained in the window. When you close the window, the button and its script are destroyed. This would cause an error – potentially a very serious one – if it's the button script that closed the window. So, JMP watches for that and makes sure that the window is hiddent but&amp;nbsp;hangs around for the button script to finish.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's a script to demonstrate this behavior. Watch the window list in your Home Window to see it:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;win1 = New Window( "Window 1",
	V List Box(
		Button Box( "Close window 1 and open window 2",
			win1 &amp;lt;&amp;lt; close window;
			win2 = New Window( "Window 2",
				&amp;lt;&amp;lt;Modal,
				V List Box( Text Box( "Click Ok to close me" ) )
			);
			win3 = New Window( "Now I'm really done",
				V List Box(
					Text Box( "Now I'm really done" ),
					Button Box( "Close Window 3", win3 &amp;lt;&amp;lt; close window )
				)
			);
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2018 23:04:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Report-Window-Doesn-t-Close/m-p/52281#M29596</guid>
      <dc:creator>Jeff_Perkinson</dc:creator>
      <dc:date>2018-02-27T23:04:55Z</dc:date>
    </item>
  </channel>
</rss>

