<?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: Adding external images to report with JSL in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Adding-external-images-to-report-with-JSL/m-p/748340#M92861</link>
    <description>&lt;P&gt;It is not possible to insert external photos directly into a report using JSL (&lt;A href="https://community.jmp.com/t5/Introduction-to-the-JMP/Introduction-to-the-JMP-Scripting-Language/ta-p/539562" target="_self"&gt;JMP Scripting Language&lt;/A&gt;&amp;nbsp;|| &lt;A href="https://www.igmguru.com/digital-marketing-programming/mulesoft-training/" target="_self"&gt;Mulesoft Course&lt;/A&gt;). Photos, on the other hand, can be included by referencing them via URL.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// Create a new report&lt;BR /&gt;myReport = New Report("My Report");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// Add a Text Box&lt;BR /&gt;myText = Text Box("This is my report.");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// Add an Image Box and specify the URL of the image&lt;BR /&gt;myImage = Image Box("&lt;A href="https://example.com/image.jpg" target="_blank"&gt;https://example.com/image.jpg&lt;/A&gt;");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// Add the Text Box and Image Box to the report&lt;BR /&gt;myReport &amp;lt;&amp;lt; Add Text Box(myText);&lt;/P&gt;&lt;P&gt;myReport &amp;lt;&amp;lt; Add Image Box(myImage);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// Display the report&lt;BR /&gt;myReport &amp;lt;&amp;lt; Show Window;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When adding an image, replace "&lt;A href="https://example.com/image.jpg" target="_blank"&gt;https://example.com/image.jpg&lt;/A&gt;" with the URL of the image. When run this script will create a report, with a text box showing the image from the given URL followed by an image box.&lt;/P&gt;</description>
    <pubDate>Mon, 22 Apr 2024 04:45:13 GMT</pubDate>
    <dc:creator>smithjohn</dc:creator>
    <dc:date>2024-04-22T04:45:13Z</dc:date>
    <item>
      <title>Adding external images to report with JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Adding-external-images-to-report-with-JSL/m-p/213598#M42729</link>
      <description>&lt;P&gt;I've found that I can copy/paste an image into a report/journal (&lt;A href="https://www.jmp.com/support/help/14-2/paste-an-image-at-the-end-of-a-report.shtml#865792" target="_blank"&gt;https://www.jmp.com/support/help/14-2/paste-an-image-at-the-end-of-a-report.shtml#865792&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;is there a way to do this in JSL? are there any options for placement/resizing? My ultimate goal is to automate the generation of reports add relevent images and then publish to HTML.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had thought to publish the reports and then add the images to the HTML file, but the files generated by JMP are not easy to modify, the &amp;lt;body&amp;gt; sections are blank and I think must be generated dynamically when the page is loaded.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2019 19:50:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Adding-external-images-to-report-with-JSL/m-p/213598#M42729</guid>
      <dc:creator>CaseyL</dc:creator>
      <dc:date>2019-06-18T19:50:38Z</dc:date>
    </item>
    <item>
      <title>Re: Adding external images to report with JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Adding-external-images-to-report-with-JSL/m-p/213609#M42731</link>
      <description>&lt;P&gt;You can read in external images into a Picture Box(), and then place that into a Journal.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

pb = Picture Box( Open( "$SAMPLE_IMAGES/tile.jpg", jpg ) );

nw = New Window( "jj", &amp;lt;&amp;lt;journal );
nw &amp;lt;&amp;lt; append( pb );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You can also adjust the size&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

pb = Picture Box( Open( "$SAMPLE_IMAGES/tile.jpg", jpg ) );
pb &amp;lt;&amp;lt; set width(800);
pb &amp;lt;&amp;lt; set height(800);

nw = New Window( "jj", &amp;lt;&amp;lt;journal );
nw &amp;lt;&amp;lt; append( pb );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;In the construction of a Journal, you can organize it's contents using the various JSL functions and objects to do location, spacing, page breaks, etc.&lt;/P&gt;
&lt;P&gt;See the Scripting Guide&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Help==&amp;gt;Books==&amp;gt;Scripting Guide&lt;/P&gt;
&lt;P&gt;and also the Scripting Index&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; Help==&amp;gt;Scripting Index&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2019 20:24:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Adding-external-images-to-report-with-JSL/m-p/213609#M42731</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2019-06-18T20:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: Adding external images to report with JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Adding-external-images-to-report-with-JSL/m-p/748313#M92848</link>
      <description>&lt;P&gt;Hi Jim and All&lt;BR /&gt;&lt;SPAN&gt;Is there a way to embed the picture directly in the script? In multi user workplace, the path/picture can get deleted&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 20 Apr 2024 22:24:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Adding-external-images-to-report-with-JSL/m-p/748313#M92848</guid>
      <dc:creator>Miof</dc:creator>
      <dc:date>2024-04-20T22:24:53Z</dc:date>
    </item>
    <item>
      <title>Re: Adding external images to report with JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Adding-external-images-to-report-with-JSL/m-p/748316#M92850</link>
      <description>&lt;P&gt;Here is an example of an image being part of JSL in a script;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
textImage = New Image(
	Char To Blob(
		"1iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJ
		cEhZcwAADsMAAA7DAcdvqGQAAAEaSURBVEhL1ZTBDYMwDEW7E7N0BeboGqzALFzZJTfqF+WLyHUCEnDokyyIk/xvp6
		SvlNL2ZGSDuzllsBDrHlP13hqLrgHCw2fZXsTbPQ9inNndMWC6KerzwVNdNA2ogMXDbC3bOxvYONg7c4zJM87rLKbVw
		taP9uSoIDRQ9VoEUQ6yAfky9sQGJuKFFquKSpsGLi9CgwgEQgPLkW9x2oCzRYhzriFHBy1OG/DDRULZ4I4OxtKB57YO
		EOK8PYjf0gFCfDGe3MFVA106jsnT6uDwJteoSm6uZ58rCYOC9DkfGuTvvFRZ/0uKeh5h/zF0DXS5cphIhARlQmAkzhn
		Y5qh6IWGZ1HQNgLP1tzdC/6SeQ4Or/Bg8Gf9ukLYvWuoqiUvI3KwAAAAASUVORK5CYII=",
		"base64compressed"
	),
	"png"
);
New Window( "Test", textImage );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Here is the code that I used to read in the image and create the JSL&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
theImage = Open( "C:\Program Files\JMP\JMPPRO\18\Samples\Images\pi.gif" );

textImage = theImage &amp;lt;&amp;lt; get picture;
Show( textImage );
Window( "pi.gif" ) &amp;lt;&amp;lt; close window;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I just cut and pasted the results of the Show()&amp;nbsp; from the log, to the script window.&lt;/P&gt;</description>
      <pubDate>Sun, 21 Apr 2024 04:55:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Adding-external-images-to-report-with-JSL/m-p/748316#M92850</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2024-04-21T04:55:49Z</dc:date>
    </item>
    <item>
      <title>Re: Adding external images to report with JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Adding-external-images-to-report-with-JSL/m-p/748340#M92861</link>
      <description>&lt;P&gt;It is not possible to insert external photos directly into a report using JSL (&lt;A href="https://community.jmp.com/t5/Introduction-to-the-JMP/Introduction-to-the-JMP-Scripting-Language/ta-p/539562" target="_self"&gt;JMP Scripting Language&lt;/A&gt;&amp;nbsp;|| &lt;A href="https://www.igmguru.com/digital-marketing-programming/mulesoft-training/" target="_self"&gt;Mulesoft Course&lt;/A&gt;). Photos, on the other hand, can be included by referencing them via URL.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// Create a new report&lt;BR /&gt;myReport = New Report("My Report");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// Add a Text Box&lt;BR /&gt;myText = Text Box("This is my report.");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// Add an Image Box and specify the URL of the image&lt;BR /&gt;myImage = Image Box("&lt;A href="https://example.com/image.jpg" target="_blank"&gt;https://example.com/image.jpg&lt;/A&gt;");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// Add the Text Box and Image Box to the report&lt;BR /&gt;myReport &amp;lt;&amp;lt; Add Text Box(myText);&lt;/P&gt;&lt;P&gt;myReport &amp;lt;&amp;lt; Add Image Box(myImage);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// Display the report&lt;BR /&gt;myReport &amp;lt;&amp;lt; Show Window;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When adding an image, replace "&lt;A href="https://example.com/image.jpg" target="_blank"&gt;https://example.com/image.jpg&lt;/A&gt;" with the URL of the image. When run this script will create a report, with a text box showing the image from the given URL followed by an image box.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Apr 2024 04:45:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Adding-external-images-to-report-with-JSL/m-p/748340#M92861</guid>
      <dc:creator>smithjohn</dc:creator>
      <dc:date>2024-04-22T04:45:13Z</dc:date>
    </item>
  </channel>
</rss>

