<?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: Saving P-Chart as an Image in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Saving-P-Chart-as-an-Image/m-p/218397#M43691</link>
    <description>&lt;P&gt;Got it - SavePicture is what I was looking for.&lt;/P&gt;</description>
    <pubDate>Mon, 22 Jul 2019 17:41:17 GMT</pubDate>
    <dc:creator>LeeP</dc:creator>
    <dc:date>2019-07-22T17:41:17Z</dc:date>
    <item>
      <title>Saving P-Chart as an Image</title>
      <link>https://community.jmp.com/t5/Discussions/Saving-P-Chart-as-an-Image/m-p/218387#M43690</link>
      <description>&lt;P&gt;I want to save my P-Charts as images instead of html files. I'm doing this through an application I am writing. Here is how I generate the P-Chart.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dtP = Control Chart(invisible,
	Sample Label( :ReleaseMonth ),
	Phase( :Phase ),
	Sample Size( :Name( "Sum-Total" ) ),
	KSigma( 3 ),
	Chart Col( :OnTimePct, P( Phase Level( "1" ), Phase Level( "2" ) ) )
);
dtpr = dtp &amp;lt;&amp;lt; report;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This is what I've done so far:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dtpr &amp;lt;&amp;lt; saveHTML( thePath || "P_Chart.html" ); // This worked to save the HTML and associated image file

dtpr &amp;lt;&amp;lt; SaveImage( thePath || "P_Chart.jpg", jpg ); // This didn't save anything

dtpr &amp;lt;&amp;lt; SavePDF( thePath || "P_Chart.pdf" ); // I tried to see what would happen if I tried saving as a PDF. The PDF file saved, but there was a blank PDF chart (i.e. no data was displayed)
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I looked at the scripting guide and it appears you can only use the SaveImage when you ALREADY have an image.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Questions:&lt;/P&gt;
&lt;P&gt;1. Can you save a P-Chart as a image?&lt;BR /&gt;2. Is there a way to get the name of the image file that is generated when an HTML is created?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I ask because the ultimate goal is to use another tool (SSIS) to save the image into a database and then retrieve it for use on a dashboard that has other charts from other sources.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2019 18:30:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Saving-P-Chart-as-an-Image/m-p/218387#M43690</guid>
      <dc:creator>LeeP</dc:creator>
      <dc:date>2019-07-22T18:30:22Z</dc:date>
    </item>
    <item>
      <title>Re: Saving P-Chart as an Image</title>
      <link>https://community.jmp.com/t5/Discussions/Saving-P-Chart-as-an-Image/m-p/218397#M43691</link>
      <description>&lt;P&gt;Got it - SavePicture is what I was looking for.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2019 17:41:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Saving-P-Chart-as-an-Image/m-p/218397#M43691</guid>
      <dc:creator>LeeP</dc:creator>
      <dc:date>2019-07-22T17:41:17Z</dc:date>
    </item>
  </channel>
</rss>

