<?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 charts as &amp;quot;.jrp&amp;quot; file in JSL in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Save-charts-as-quot-jrp-quot-file-in-JSL/m-p/77854#M36277</link>
    <description>&lt;P&gt;Hi Wendy,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Good day! I am new in scripting, and still learning.&lt;/P&gt;&lt;P&gt;I read your code and try to execute it. I realized that if i don't include "&lt;SPAN&gt;by(:pin_group)&lt;/SPAN&gt;".. it will save a JMP report&lt;/P&gt;&lt;P&gt;This is the line that i used for testing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;dist= dt &amp;lt;&amp;lt; Distribution( Continuous Distribution( Column( :Measurement ),Normal Quantile Plot( 0 ) ), by(:pin_group));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What i am trying to do is:&lt;/P&gt;&lt;P&gt;1. Get the distribution (by group ~ 23 groups)&lt;/P&gt;&lt;P&gt;2. Perrform modification on the histogram (Both axis and add ref line - for all the histogram generated)&lt;/P&gt;&lt;P&gt;3. Save as JRP (Your example - code), histogram with the data table. &amp;gt;&amp;gt; This is where i am facing problem.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a specific code to save as JRP with multiple histograms in the same report?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please educate me. Thanks and appreciate your help!&lt;/P&gt;</description>
    <pubDate>Thu, 04 Oct 2018 02:01:11 GMT</pubDate>
    <dc:creator>sankuan</dc:creator>
    <dc:date>2018-10-04T02:01:11Z</dc:date>
    <item>
      <title>Save charts as ".jrp" file in JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Save-charts-as-quot-jrp-quot-file-in-JSL/m-p/10582#M10240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys&lt;/P&gt;&lt;P&gt;During my work I came across a requirement to save charts as report in JMP (".jrp" file) - a chart which created during a script run.&lt;/P&gt;&lt;P&gt;After long day of trying all code combination for saving files in JSL it looks like there is no commend for saving in a "report" type - &lt;/P&gt;&lt;P&gt;only journal (".jrn"), .pdf and others...&lt;/P&gt;&lt;P&gt; Also, while searching in the forums I found that the last time someone asked similar question in the subject it was in 2011 and no one had an answer..&lt;/P&gt;&lt;P&gt; so:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Can I save ".jrp" file in jsl ? &lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2015 18:02:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Save-charts-as-quot-jrp-quot-file-in-JSL/m-p/10582#M10240</guid>
      <dc:creator>ariel</dc:creator>
      <dc:date>2015-01-14T18:02:21Z</dc:date>
    </item>
    <item>
      <title>Re: Save charts as ".jrp" file in JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Save-charts-as-quot-jrp-quot-file-in-JSL/m-p/10583#M10241</link>
      <description>&lt;P&gt;Save as .jrp with some interactivity:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="font-size: 15px; font-family: Courier; color: #942193;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
biv = Bivariate( Y( :Weight ), X( :Height ) );
Wait(1);
biv&amp;lt;&amp;lt; Bring Window To Front;
Main Menu( "Save As" );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Save as .jrp automatically:&lt;/P&gt;
&lt;P&gt;A .jrp appears to be just a .jsl that autoruns. The code contains 1) a reference to a saved data table or to an embedded data table, and 2) the code to generate the report. Hence, it should be quite straightforward to script the saving of a .jrp.&lt;/P&gt;
&lt;P&gt;Here is one way that seems to work:&lt;/P&gt;
&lt;P style="font-size: 15px; font-family: Courier;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="font-size: 15px; font-family: Courier; color: #008f00;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;// Function to save .jrp
Save_jrp = Function( {dt, obj, dir, filename},
    {embed_data = 0}, // Switch between embedded and referenced data table.
    Save Text File(
        dir || filename || ".jrp",
        If( embed_data,
            Char(
                Eval Expr(
                    Expr( dt &amp;lt;&amp;lt; get script );
                    Expr( obj &amp;lt;&amp;lt; get script );
                )
            ),
            Char(
                Eval Expr(
                    Open( Expr( dt &amp;lt;&amp;lt; get path ) );
                    Expr( obj &amp;lt;&amp;lt; get script );
                )
            )
        )
    )
);
 
// Define example input data: data table, report, path and file name
Open( "$SAMPLE_DATA/Big Class.jmp" );
biv = Bivariate( Y( :Weight ), X( :Height ) );
dt = biv &amp;lt;&amp;lt; get data table;
biv &amp;lt;&amp;lt; set window title( "MyReport" );
fname = biv &amp;lt;&amp;lt; get window title;
path = Get Default Directory();
 
// Run function
Save_jrp( dt, biv, path, fname );
 
// Test if it worked
Close( dt, no save );
Wait( 1 );
Open( path || fname || ".jrp" );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P style="font-size: 15px; font-family: Courier;"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 09 Sep 2017 14:44:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Save-charts-as-quot-jrp-quot-file-in-JSL/m-p/10583#M10241</guid>
      <dc:creator>ms</dc:creator>
      <dc:date>2017-09-09T14:44:09Z</dc:date>
    </item>
    <item>
      <title>Re: Save charts as ".jrp" file in JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Save-charts-as-quot-jrp-quot-file-in-JSL/m-p/10584#M10242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, thanks for your answer and for your code&lt;/P&gt;&lt;P&gt;I really appreciate u took the time and built this function all for me,&lt;/P&gt;&lt;P&gt;The problem is it doesn't really work under my conditions... &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;What u wrote is indeed working, &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;but not for my &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;needs.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;For some &lt;/SPAN&gt;reason&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; it just save the table again and no the &lt;/SPAN&gt;report &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;SPAN __jive_emoticon_name="sad" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.jmp.com/7.0.1.0/images/emoticons/sad.png"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Jan 2015 22:09:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Save-charts-as-quot-jrp-quot-file-in-JSL/m-p/10584#M10242</guid>
      <dc:creator>ariel</dc:creator>
      <dc:date>2015-01-17T22:09:53Z</dc:date>
    </item>
    <item>
      <title>Re: Save charts as ".jrp" file in JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Save-charts-as-quot-jrp-quot-file-in-JSL/m-p/10585#M10243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you just took the code without any thought to the principle behind it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From testing out the function it does indeed save the report, but there are often errors due to undefined variables if your report is anything complex.&amp;nbsp; But let's read the principle behind why the function works.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #555555;"&gt;&lt;SPAN style="font-size: 13.3333px; color: #575757; font-family: arial, helvetica, sans-serif; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #555555;"&gt;&lt;SPAN style="font-size: 13.3333px; color: #575757; font-family: arial, helvetica, sans-serif; line-height: 1.5em;"&gt;What MS wrote: &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #555555;"&gt;Save as .jrp automatically:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #555555;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;A .jrp appears to be just a .jsl that autoruns.&lt;/SPAN&gt; The code contains 1) a reference to a saved data table or to an embedded data table, and 2) the code to generate the report. Hence, it should be quite straightforward to script the saving of a .jrp.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #555555;"&gt;(underlined for emphasis)&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #555555;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #555555;"&gt;Thus, if you have a script that generates a report, just save the script as a .jrp instead of a .jsl.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Dec 2015 17:12:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Save-charts-as-quot-jrp-quot-file-in-JSL/m-p/10585#M10243</guid>
      <dc:creator>msharp</dc:creator>
      <dc:date>2015-12-08T17:12:49Z</dc:date>
    </item>
    <item>
      <title>Re: Save charts as ".jrp" file in JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Save-charts-as-quot-jrp-quot-file-in-JSL/m-p/10586#M10244</link>
      <description>&lt;P&gt;This question comes up fairly often.&amp;nbsp; &lt;SPAN class="cs8A70F0C8"&gt;Unfortunately, there is not a JSL command to save a report directly as a JRP file.&amp;nbsp; This has been suggested previously as a feature for consideration in a future release of JMP.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="cs95E872D0"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="cs95E872D0"&gt;&lt;SPAN class="cs8A70F0C8"&gt;As noted previously, a JRP file is simply a text file containing JSL code.&amp;nbsp; You can extract the script from the platform and then use Save Text File to save the file path and script into a text file with the JRP file extension.&amp;nbsp; Here is a more simple example that may help to clarify:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="cs95E872D0"&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "$SAMPLE_DATA\Big Class.jmp" );
dist = dt &amp;lt;&amp;lt; Distribution(
  Continuous Distribution( Column( :weight ) ),
  Nominal Distribution( Column( :age ) )
);
distScript = dist &amp;lt;&amp;lt; Get Script;
Save Text File(
  "C:\temp\DistributionScript.jrp",
  "//!
    Open( \!"$SAMPLE_DATA\Big Class.jmp\!" );"
    ||
  Char( Name Expr( distScript ) )
);
Close( dt, No Save );
Wait( 2 ); //For demonstration purposes
Open( "C:\temp\DistributionScript.jrp" );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="cs95E872D0" style="font-size: 13.3333px;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="cs95E872D0" style="font-size: 13.3333px;"&gt;Hope that helps!&lt;/P&gt;</description>
      <pubDate>Sat, 09 Sep 2017 14:45:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Save-charts-as-quot-jrp-quot-file-in-JSL/m-p/10586#M10244</guid>
      <dc:creator>Wendy_Murphrey</dc:creator>
      <dc:date>2017-09-09T14:45:05Z</dc:date>
    </item>
    <item>
      <title>Re: Save charts as ".jrp" file in JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Save-charts-as-quot-jrp-quot-file-in-JSL/m-p/46742#M26627</link>
      <description>This is a nice code. Thank you MS. If I have multiple graphs in one page with oneway distribution, tables and graph builder using H list Box and V list box, for some reason obj&amp;lt;&amp;lt; get script shows an error. Do I have to use a parent directory?</description>
      <pubDate>Fri, 03 Nov 2017 16:31:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Save-charts-as-quot-jrp-quot-file-in-JSL/m-p/46742#M26627</guid>
      <dc:creator>vishwasanj</dc:creator>
      <dc:date>2017-11-03T16:31:35Z</dc:date>
    </item>
    <item>
      <title>Re: Save charts as ".jrp" file in JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Save-charts-as-quot-jrp-quot-file-in-JSL/m-p/77854#M36277</link>
      <description>&lt;P&gt;Hi Wendy,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Good day! I am new in scripting, and still learning.&lt;/P&gt;&lt;P&gt;I read your code and try to execute it. I realized that if i don't include "&lt;SPAN&gt;by(:pin_group)&lt;/SPAN&gt;".. it will save a JMP report&lt;/P&gt;&lt;P&gt;This is the line that i used for testing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;dist= dt &amp;lt;&amp;lt; Distribution( Continuous Distribution( Column( :Measurement ),Normal Quantile Plot( 0 ) ), by(:pin_group));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What i am trying to do is:&lt;/P&gt;&lt;P&gt;1. Get the distribution (by group ~ 23 groups)&lt;/P&gt;&lt;P&gt;2. Perrform modification on the histogram (Both axis and add ref line - for all the histogram generated)&lt;/P&gt;&lt;P&gt;3. Save as JRP (Your example - code), histogram with the data table. &amp;gt;&amp;gt; This is where i am facing problem.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a specific code to save as JRP with multiple histograms in the same report?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please educate me. Thanks and appreciate your help!&lt;/P&gt;</description>
      <pubDate>Thu, 04 Oct 2018 02:01:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Save-charts-as-quot-jrp-quot-file-in-JSL/m-p/77854#M36277</guid>
      <dc:creator>sankuan</dc:creator>
      <dc:date>2018-10-04T02:01:11Z</dc:date>
    </item>
    <item>
      <title>Re: Save charts as ".jrp" file in JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Save-charts-as-quot-jrp-quot-file-in-JSL/m-p/258899#M50835</link>
      <description>&lt;P&gt;In JMP 16 the &lt;FONT face="courier new,courier"&gt;&amp;lt;&amp;lt;Save Window Report&lt;/FONT&gt; message will save a report as a .JRP file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
//This message can be sent to any display box object but will be applied to the report window
Open( "$SAMPLE_DATA/Big Class.jmp" );
d = distribution( Column( :height ) );
d &amp;lt;&amp;lt; Save Window Report(
	"$DOCUMENTS/test.jrp",
	embed data( 1 )
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Nov 2021 14:43:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Save-charts-as-quot-jrp-quot-file-in-JSL/m-p/258899#M50835</guid>
      <dc:creator>Jeff_Perkinson</dc:creator>
      <dc:date>2021-11-15T14:43:34Z</dc:date>
    </item>
  </channel>
</rss>

