cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
Gabriela_MJ
Level I

How do I create a *.html file from output from several JMP reports?

Hello,

I am moving some statistical reports (graphics) from one software to JMP.

At the end of the analysis, I need to put all the graphs (may be .png format) into an .html file. 

Is it possible to do this in JMP? I have the scripts for each graph, however I do not find the way to write an .html file yet.

 

Thanks in advanced.

2 ACCEPTED SOLUTIONS

Accepted Solutions

Re: Creating a .html file

You can save several open reports to Interactive HTML with Data all at once using "Create Web Report" under the view "menu" in JMP 13. It will generate an index page with links to each report.  Our Intereactive HTML examples at http://www.jmp.com/jmphtml5/ were saved this way.

 

If you have JMP 11 or 12, you can use this add-in:

https://community.jmp.com/t5/JMP-Add-Ins/HTML5-Auto-Publishing/ta-p/22673

 

If you really just want images all on one page, you'd have to save each report to an image, then build up the HTML page in JSL. You can look at https://community.jmp.com/t5/JMP-Scripts/Export-Data-Table-to-HTML/ta-p/23410 for and example of building an HTML table from a JMP data table and insert <img> tags instead of column data.  

View solution in original post

Craige_Hales
Super User

Re: Creating a .html file

Or journal all of the reports and make the HTML from the journal, or, create a dashboard of the reports and create the html from that.

Craige

View solution in original post

11 REPLIES 11
txnelson
Super User

Re: Creating a .html file

Here is the example taken directly from

     Help==>Scripting Index==>Save Interactive HTLM

Names Default To Here( 1 );
//This message applies to all display box objects
Open( "$SAMPLE_DATA/Big Class.jmp" );
biv = bivariate( y( :weight ), x( :height ) );
rbiv = biv << report;
rbiv << Save Interactive HTML( "path/to/example.html" );
Jim
Gabriela_MJ
Level I

Re: Creating a .html file

Hello,
Thanks for your suggestion. However, what I need it to put into a .html file the graphs which are from different (and several) .jmp scripts.
In the software that I used to use, I used to save each graph as an .png file and I writed a routing which creates the .html file using the images. Now, I have the graphs from JMP but I would like to know if it is possible to create the .html report directly from JMP.

Kind regards,
txnelson
Super User

Re: Creating a .html file

The answer is yes.  If you want to create your own custom HTLM file, you would use

     Save Text File( path, text|blob, <mode("replace"|"append")> )

Take a look for an example in:

     Help==>Scripting Index==>Save Test File

Jim

Re: Creating a .html file

You can save several open reports to Interactive HTML with Data all at once using "Create Web Report" under the view "menu" in JMP 13. It will generate an index page with links to each report.  Our Intereactive HTML examples at http://www.jmp.com/jmphtml5/ were saved this way.

 

If you have JMP 11 or 12, you can use this add-in:

https://community.jmp.com/t5/JMP-Add-Ins/HTML5-Auto-Publishing/ta-p/22673

 

If you really just want images all on one page, you'd have to save each report to an image, then build up the HTML page in JSL. You can look at https://community.jmp.com/t5/JMP-Scripts/Export-Data-Table-to-HTML/ta-p/23410 for and example of building an HTML table from a JMP data table and insert <img> tags instead of column data.  

Craige_Hales
Super User

Re: Creating a .html file

Or journal all of the reports and make the HTML from the journal, or, create a dashboard of the reports and create the html from that.

Craige

Re: Creating a .html file

Update for JMP 14.

In JMP 14, View > Create Web Report has moved to File > Publish. Please see: https://www.jmp.com/support/help/14/create-a-web-report.shtml

 

The JSL function for creating a web report in JMP 14 is New Web Report() shown in the example below from https://community.jmp.com/t5/Discovery-Summit-2018/Sharing-JMP-Graphs-and-Reports-US-2018-402/ta-p/7...:

 

Names Default To Here( 1 );
Open( "$SAMPLE_DATA/Big Class.jmp", Invisible );
jmpreport = bivariate( y( :weight ), x( :height ) );
webreport = New Web Report ();
webreport << Add Report( jmpreport );
webreport << Index(
Title( "Publish Test" ),
Description( "This is a custom index page" ),
Style( "Grid" )
);
file = webreport << Save( "$DESKTOP" );
If( !Is Empty( file ),
Web( file )
);

 

 

kjohnson23
Level II

Re: Creating a .html file

hello everybody,

 

I've tried following this code to publish a web report from JSL but it seems to give me the same output as if I saved interactive html.  The reason why this matters is that the interactive html is way too large of a file to publish to web.  When i manually go through the GUI to publish the web report it comes out just fine, but via JSL does not seem to work for me.  I was curious if anybody else has ran into this issue and come up with a solution.

 

thank you very much,

mzwald
Staff

Re: Creating a .html file

Try 

report << Save HTML("C:\test.html");

That should save as HTML rather than interactive HTML.

Re: Creating a .html file

Hi @kjohnson23 ,

 

You're right. That example code will result in producing just one Interactive HTML file.It is equivalent to using File>Publish and selecting only one report. If more than one report is chosen, an index page with thumbnails will be produced with links to individual Interactive HTML files, one for each report.

In JSL to add a second report, first create it:

jmpreport2 = bivariate( y( :weight ), x( :age ) );

then, after the lines that create the Web Report and add the first report, add the second report:

webreport << Add Report( jmpreport2 );

This will produce an in index page with thumbnails that link to each Interactive HTML file.

Unfortunately, this still won't resolve your file being "way too large to publish to web" issue. To publish all that is produced to the web, you would need to copy the whole folder produced including sub folders with Interactive HTML files just as large as if you used Save As Interactive HTML.

 

Having said that, I may still be able to help you resolve your file size issue, but first I need to understand what you mean by it coming out fine when you go through the GUI.  I would expect the same results going through the GUI, but maybe you are doing something slightly different when you use the GUI. 

 

Can you please describe the steps you took with the GUI in more detail and describe how the output differs from doing the same with JSL?  I'm not quite sure exactly what you man by coming out fine. If you don't need interactivity, @mzwald's reply should work to reduce the file size.

 

It would also help to know what version of JMP you are using. 

 

Thanks, 

~John