<?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: Save new graph  instead of overwriting the already saved ones in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Save-new-graph-instead-of-overwriting-the-already-saved-ones/m-p/54081#M30549</link>
    <description>&lt;P&gt;The following change should allow you to save the graphs as you said:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;report(pc) &amp;lt;&amp;lt; save picture("D:\A_" || format(today(),"mmddyyyy",8) || ".jpg");&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 29 Mar 2018 10:23:05 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2018-03-29T10:23:05Z</dc:date>
    <item>
      <title>Save new graph  instead of overwriting the already saved ones</title>
      <link>https://community.jmp.com/t5/Discussions/Save-new-graph-instead-of-overwriting-the-already-saved-ones/m-p/54078#M30546</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am working with a huge database like below.&lt;/P&gt;&lt;P&gt;Manufacturer: Product: Model: Quantity&lt;/P&gt;&lt;P&gt;A: X:G1: 1000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;B: S:F2: 5000&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;C: Y:N5: 2500&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;A: R:G5: 6000&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;and so on..&lt;/P&gt;&lt;P&gt;Now, at the beginning&amp;nbsp;of my query&amp;nbsp;I am filtering the &lt;STRONG&gt;Manufacturer. &lt;/STRONG&gt;With the remaining columns,&amp;nbsp;I am doing some calculations and plot some graphs and then save them as an image file. For ex.&lt;/P&gt;&lt;P&gt;pc = graph builder(...);&lt;/P&gt;&lt;P&gt;report(pc) &amp;lt;&amp;lt; save picture("D:\&lt;STRONG&gt;Graph&lt;/STRONG&gt;.jpg");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have 2 questions related to modification of this script&lt;/P&gt;&lt;P&gt;1. Every time I run the script, the previous saved graph &lt;STRONG&gt;Graph.jpg&lt;/STRONG&gt; is being overwritten. Is it possible to save a new graph keeping the old ones intact?&lt;/P&gt;&lt;P&gt;2. Since I am filtering the &lt;STRONG&gt;Manufacturer&lt;/STRONG&gt; at the beginning, is it possible to save the graph automatically with a title depending on the chosen manufacturer and&amp;nbsp;today's&amp;nbsp;date, for ex. &lt;STRONG&gt;A_29032018.jpg&lt;/STRONG&gt;?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Mar 2018 08:32:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Save-new-graph-instead-of-overwriting-the-already-saved-ones/m-p/54078#M30546</guid>
      <dc:creator>PG</dc:creator>
      <dc:date>2018-03-29T08:32:53Z</dc:date>
    </item>
    <item>
      <title>Re: Save new graph  instead of overwriting the already saved ones</title>
      <link>https://community.jmp.com/t5/Discussions/Save-new-graph-instead-of-overwriting-the-already-saved-ones/m-p/54081#M30549</link>
      <description>&lt;P&gt;The following change should allow you to save the graphs as you said:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;report(pc) &amp;lt;&amp;lt; save picture("D:\A_" || format(today(),"mmddyyyy",8) || ".jpg");&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 29 Mar 2018 10:23:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Save-new-graph-instead-of-overwriting-the-already-saved-ones/m-p/54081#M30549</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-03-29T10:23:05Z</dc:date>
    </item>
    <item>
      <title>Re: Save new graph  instead of overwriting the already saved ones</title>
      <link>https://community.jmp.com/t5/Discussions/Save-new-graph-instead-of-overwriting-the-already-saved-ones/m-p/54085#M30553</link>
      <description>&lt;P&gt;Hello Jim,&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class=" language-jsl"&gt;&lt;CODE class="  language-jsl"&gt;&lt;SPAN class="token function"&gt;report&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;pc&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;&amp;lt;&lt;/SPAN&gt; save picture&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;"D:\&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;A_&lt;/STRONG&gt;&lt;/FONT&gt;"&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;||&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;format&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;today&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;"mmddyyyy"&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;8&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;||&lt;/SPAN&gt; &lt;SPAN class="token string"&gt;".jpg"&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;If I re-run the&amp;nbsp;query and filter Manufacturer&amp;nbsp;&lt;STRONG&gt;C&lt;/STRONG&gt;&amp;nbsp;this time, I have to manually change the script&amp;nbsp;to&amp;nbsp;&lt;/P&gt;&lt;PRE class=" language-jsl"&gt;&lt;CODE class="  language-jsl"&gt;&lt;SPAN class="token function"&gt;report&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;pc&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;&amp;lt;&lt;/SPAN&gt; save picture&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;"D:\&lt;FONT color="#FF0000"&gt;C&lt;STRONG&gt;_&lt;/STRONG&gt;&lt;/FONT&gt;"&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;||&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;format&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;today&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;"mmddyyyy"&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;8&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;||&lt;/SPAN&gt; &lt;SPAN class="token string"&gt;".jpg"&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Is it possible somehow that I can tell the program to find which Manufacturer I have&amp;nbsp;filtered at the beginning&amp;nbsp;and change the name of the file automatically?&lt;/P&gt;</description>
      <pubDate>Thu, 29 Mar 2018 11:10:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Save-new-graph-instead-of-overwriting-the-already-saved-ones/m-p/54085#M30553</guid>
      <dc:creator>PG</dc:creator>
      <dc:date>2018-03-29T11:10:43Z</dc:date>
    </item>
    <item>
      <title>Re: Save new graph  instead of overwriting the already saved ones</title>
      <link>https://community.jmp.com/t5/Discussions/Save-new-graph-instead-of-overwriting-the-already-saved-ones/m-p/54090#M30556</link>
      <description>&lt;P&gt;assumming that your data table variable that contains the manufacturer is called Manufacture, and that every row in the data table contains the "A" or "B" etc. then you can use the following&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;report(pc) &amp;lt;&amp;lt; save picture("D:\" || :Manufacturer[1] || _" || format(today(),"mmddyyyy",8) || ".jpg");&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I strongly encourage you to read the Scripting Guide to provide you with the structures and syntax of JSL.&amp;nbsp; It is available at:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Help==Books==&amp;gt;Scripting Guide&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Mar 2018 12:50:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Save-new-graph-instead-of-overwriting-the-already-saved-ones/m-p/54090#M30556</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-03-29T12:50:16Z</dc:date>
    </item>
  </channel>
</rss>

