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.
Re: Creating a .html fileHi @aniruddhr ,
To find out why parts of your window/report aren't interactive, you should look at the log in JMP after running the script to create the Interactive HTML file. There should be messages starting with "Interactive HTML" followed by an item used in your report that is not supported.
One thing I noticed in your attached image is that the local data filter has both Show and Include modes enabled. Interactive HTML cannot support the local data filter's Include mode. To have the local data filter in your interactive HTML output be interactive you will need to disable the Include mode.
To do this in your in your JSL , you will need to add Mode( Include( 0 ) ), within the Local Data Filter Method.
I can't tell from your description if you have one or two local data filters. Currently we can only support one local data filter at a time. If you have more than one, only the first will be interactive.
I hope this helps,
~John
Re: Creating a .html fileHi, the command worked in creating an interactive HTML file. However, I am not able to "interact" with the last of the two graphs in the window. I cannot choose within the local data filter that is open. It works fine for the first graph. Any ideas?
Re: Creating a .html fileHi @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 );<BR />
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
Re: Creating a .html fileTry
report << Save HTML("C:\test.html");
That should save as HTML rather than interactive HTML.
Re: Creating a .html filehello 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,
Re: Creating a .html fileUpdate 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/79950:
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 )
);
Re: Creating a .html fileOr 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.
Re: Creating a .html fileYou 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
tags instead of column data.
Re: Creating a .html fileThe answer is yes. If you want to create your own custom HTLM file, you would use
Save Text File( path, text|blob, )
Take a look for an example in:
Help==>Scripting Index==>Save Test File
Re: Creating a .html fileHello,
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,Re: Creating a .html fileHere 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" );