<?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 unwanted hidden report generated when saving journal to PDF in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/unwanted-hidden-report-generated-when-saving-journal-to-PDF/m-p/383185#M63381</link>
    <description>&lt;P&gt;I have been using scripts that put many graphs to a journal then save the journal as pdf and close. The reports can get quite big, and I repeat the operation many times.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below the part of script I use to save the current journal as pdf.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;myjrn = Current Journal();
myjrn &amp;lt;&amp;lt; Save PDF( "MyFile.pdf", Show Page Setup( 0 ) );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I realise recently in JMP15 that when the last line is executed a hidden report is also produced in Window List, which seems to be a copy of the journal.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My script then closes the journal.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;myrn&amp;lt;&amp;lt;closewindow(1);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But the hidden report remains open. If I continue to run many scripts I end up running out of memory.&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2742"&gt;@martindemel&lt;/a&gt; :&amp;nbsp; How to close this hidden report?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 09 Jun 2023 19:46:25 GMT</pubDate>
    <dc:creator>glimond67</dc:creator>
    <dc:date>2023-06-09T19:46:25Z</dc:date>
    <item>
      <title>unwanted hidden report generated when saving journal to PDF</title>
      <link>https://community.jmp.com/t5/Discussions/unwanted-hidden-report-generated-when-saving-journal-to-PDF/m-p/383185#M63381</link>
      <description>&lt;P&gt;I have been using scripts that put many graphs to a journal then save the journal as pdf and close. The reports can get quite big, and I repeat the operation many times.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below the part of script I use to save the current journal as pdf.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;myjrn = Current Journal();
myjrn &amp;lt;&amp;lt; Save PDF( "MyFile.pdf", Show Page Setup( 0 ) );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I realise recently in JMP15 that when the last line is executed a hidden report is also produced in Window List, which seems to be a copy of the journal.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My script then closes the journal.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;myrn&amp;lt;&amp;lt;closewindow(1);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But the hidden report remains open. If I continue to run many scripts I end up running out of memory.&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2742"&gt;@martindemel&lt;/a&gt; :&amp;nbsp; How to close this hidden report?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 19:46:25 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/unwanted-hidden-report-generated-when-saving-journal-to-PDF/m-p/383185#M63381</guid>
      <dc:creator>glimond67</dc:creator>
      <dc:date>2023-06-09T19:46:25Z</dc:date>
    </item>
    <item>
      <title>Re: unwanted hidden report generated when saving journal to PDF</title>
      <link>https://community.jmp.com/t5/Discussions/unwanted-hidden-report-generated-when-saving-journal-to-PDF/m-p/383241#M63386</link>
      <description>&lt;P&gt;Issue could be same as here &lt;A href="https://community.jmp.com/t5/Discussions/JSL-Send-analysis-to-journal-and-then-save-PDF/td-p/14796" target="_self"&gt;JSL: Send analysis to journal, and then save PDF&lt;/A&gt; . Seems like JMP won't allow you to save Journal as PDF. So it seems like when you run &amp;lt;&amp;lt; Save PDF it will first convert the journal to report and this report is the hidden window.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not sure if you can get reference to this Report which is generated, but you could get all open windows before running &amp;lt;&amp;lt; Save PDF and then after saving run it again, and close the "extra" window.&lt;/P&gt;</description>
      <pubDate>Fri, 07 May 2021 15:12:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/unwanted-hidden-report-generated-when-saving-journal-to-PDF/m-p/383241#M63386</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2021-05-07T15:12:49Z</dc:date>
    </item>
    <item>
      <title>Re: unwanted hidden report generated when saving journal to PDF</title>
      <link>https://community.jmp.com/t5/Discussions/unwanted-hidden-report-generated-when-saving-journal-to-PDF/m-p/385855#M63597</link>
      <description>&lt;P&gt;Here is what you need:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;The invisible report is generated invisible, but it will be the last window created&lt;/LI&gt;
&lt;LI&gt;Using “Get Window List()” combined with “Get Window Title”&lt;/LI&gt;
&lt;/UL&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;windowList = Get Window List()&amp;lt;&amp;lt; Get Window Title();&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;you will see the titles of the window and see the Report: Untitled # will be the last entry.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;With that knowledge and assuming you do not add additional windows in-between you can close that window using&lt;/LI&gt;
&lt;/UL&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Window(windowList[N Items(windowList)]) &amp;lt;&amp;lt; close window;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;UL&gt;
&lt;LI&gt;Your script should then look like this:&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;myjrn = Current Journal();
myjrn &amp;lt;&amp;lt; Set page setup( margins( 0.75, 0.75, 0.75, 0.75 ), scale( 0.65 ), portrait( 1 ), paper size( "A4" ) );
myjrn &amp;lt;&amp;lt; Set Print Headers( "My Header", "", "Page &amp;amp;pn; of &amp;amp;pc;" );
myjrn &amp;lt;&amp;lt; Save PDF( "MyFile.pdf", Show Page Setup( 0 ) );
myjrn &amp;lt;&amp;lt; close window; // in case you want the journal closed

windowList = Get Window List()&amp;lt;&amp;lt; Get Window Title();
Window(windowList[N Items(windowList)]) &amp;lt;&amp;lt; close window;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Of course you could be even smarter and check any window title with “Report: Untitled…” in the name and close these. But that’s another story :smiling_face_with_smiling_eyes:&lt;/img&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another alternative is to use "Current Report". In general I try to reference to windows explicitly (e.g. through names I grab or assigning if possible. "Current journal" a or "current report" or "current data table" always have a chance to refer to the wrong window/table/report in case there are either multiples open or the user has time to do something in-between.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I cannot say something about why the behaviour changed with JMP 15 but &lt;A href="mailto:support@jmp.com" target="_blank"&gt;support@jmp.com&lt;/A&gt;&amp;nbsp;may be able to answer this question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;All the best, Martin&lt;/P&gt;</description>
      <pubDate>Mon, 17 May 2021 15:30:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/unwanted-hidden-report-generated-when-saving-journal-to-PDF/m-p/385855#M63597</guid>
      <dc:creator>martindemel</dc:creator>
      <dc:date>2021-05-17T15:30:24Z</dc:date>
    </item>
  </channel>
</rss>

