Adding an image from a data table to outputWith a JSL script, I'm trying to construct a display that will show a small table of 4 rows and 2 columns. The rows in the first column of this table will be the names of 4 columns of the data table. The values in the 2nd column of my output will be pulled from the 4 columns of my data table, depending on selection criteria that I will program into the script. Along with the table, I want to display an image which is stored in another column of my data table. This column is formatted as an expression column. I know how to get images into the column, but how do I reference those images in a JSL script?
Thanks in advance!
Bruce
Re: Adding an image from a data table to outputThanks to all the replies I got to this post. Each reply helped me learn more about JMP and about how to get to my final solution. I had to choose one to accept as the solution and it was the one that most directly resembles my final result.
Bruce
Re: Adding an image from a data table to outputFrom my first response, @pmroz and @Craige_Hales responses, you can see that there are numerous JMP options for creating displays. What you script depends upon what characteristics you want for the final "report".
- Will the person viewing the report be using JMP to open a Journal, a table, a .jrp file, an application? Do you want dynamic controls like a next button, or selection boxes, or just a long display with simple scrolling?
- Or will the person viewing not use JMP and they will be using a webpage, a PPT file, a PDF or WORD doc?
When I have a large number of displays (>20) and the consumer of the report will not be using JMP, I create a custom PPTX report or create a web report with a list and a dynamic selector of names to display the picture (which requires a little html scripting). When the consumer will be using JMP, I use dynamic controls with buttons and pic lists or trees.
Attached is another script (TableBoxwithPics.jsl) that creates of a JMP report that can be journaled or saved in an alternate static output.

Re: Adding an image from a data table to output
dt = Open( "$sample_data/big class families.jmp" );
New Window( "people",
vlistbox(
picholder = Border Box( Text Box( "" ) ),
namebox = textbox(""),
Button Box( "next", advance() )
)
);
curRow = 0;
advance = Function( {},
{},
curRow += 1;
If( curRow > N Rows( dt ),
curRow = 1
);
(picholder << child) << delete;
picholder << append( dt:picture[curRow] );
namebox<<SETTEXT></SETTEXT>
Window with picture from data tableWindow with picture from data tableWindow with picture from data table
Re: Adding an image from a data table to outputCheck out Justin's and my presentation at the latest Discovery conference in Cary. One of the scripts shows how to display an image stored in a table cell.
Re: Adding an image from a data table to outputI have my images in a JMP data table using a script similar to the one you attached. However, now I want to output the images into some type of JMP report. I'm not sure what kind of container would I use? If I just wanted a simple table with the name of the image and the image itself, how would that script segment look?
Thanks again!
Bruce
Re: Adding an image from a data table to outputYou did not mention what type of container you will be using. If a Window with a table, JMP 14 has a column property called an Event Handler. Also there was an interesting discussion regarding hyperlinks in a Text Box Hyperlinks-in-Text-Box.
I attached a script with and example of a table with a picture and an Event Handler. The blog would not allow me to add a file with extension .jsl, so I added a .txt. Download the file and drop the .txt extension to open in JMP.
The JMP sample datatable SAS Offices.jmp provides another example of an Event Handler for a data table.