For the latest version of JMP Help, visit JMP.com/help.


Scripting Guide > Extending JMP > JMP Live and JMP Public > Example of Publishing Content to JMP Live
Publication date: 04/30/2021

Example of Publishing Content to JMP Live

This example shows how to save a bivariate analysis as a report and publish the report to JMP Live.

publishUrl = "https://live.company.com:3501";
username = "xyz@jmp.com";
password = "test";
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Color by Column( :sex );
 
rpt = dt << Bivariate(
	Y( :weight ),
	X( :height ),
	Automatic Recalc( 1 ),
	Fit Line( {Line Color( {213, 72, 87} )} ),
	Local Data Filter( Add Filter( columns( :sex ) ) )
);
 
webrpt = New Web Report();
// the title that appears above the graph and on the browser tab
webrpt << Add Report( rpt, Title( "Big Class Bivariate" ), Description( "My test" ) );
url = webrpt << Publish( URL( publishUrl ), API Key( APIkey ), Username( username ), Password( password ), public( 1 ) ); // public report
 
If( webrpt << IsSuccessful,
	Web( url ),
	Write( "\!nPublish failed: ", webrpt << Get Status Message )
);
 
rpt << Close Window();
Close( dt, NoSave );
Want more information? Have questions? Get answers in the JMP User Community (community.jmp.com).