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


Scripting Guide > Extending JMP > Share Reports on JMP Live > Publish a Single Report to JMP Live
Publication date: 11/29/2021

Publish a Single Report to JMP Live

Publish a single report to JMP Live using a JMP Live Report.

The following example creates a Bivariate report and an empty JMP Live Report called webreport, adds the Bivariate report to the webreport, and publishes the webreport to JMP Live:

dt = Open( "$SAMPLE_DATA\Big Class.jmp" );
// Create a Bivariate report.
biv = Bivariate( X( :Height ), Y( :Weight ));
// Create an empty JMP Live Report.
webreport = New Web Report();

/* Add the Bivariate report to the webreport. A title is required and a description is optional.*/

webreport << Add Report( biv, Title( "Bivariate Report" ), Description( "A test of the new scripting" ));

/* Publish the webreport to JMP Live as a private report. Use the JMP Live Connection you established and return a JMP Live object called liveresult. */

liveresult = liveconnection << Publish( webreport );

You can use JSL to make the report visible to everyone or share the report with groups in JMP Live. See the Set Public and Share With Groups messages in the JMP Scripting Index at Help > Scripting Index.

Work with a JMP Live Result

The Publish function returns a JMP Live Result (liveresult). Use JSL scripting functions on a JMP Live Result to get information, such as whether the publishing succeeded or failed, failure codes, and more:

// Return the outcome of the last action (1 for success, 0 for failure).

liveresult << Succeeded ();

// Return any error messages from the last action.

liveresult << Get Error Message();

The JMP Live Result can be made scriptable and turned into a JMP Live Report (for a single report) or a JMP Live Folder object (for multiple reports) so that you can send commands to it. The following example changes a JMP Live Result into a scriptable JMP Live Report and then changes the report access from private to public:

livereport = liveresult << As Scriptable();
livereport << Set Public( 1 );

See the JMP Live Report object in the JMP Scripting Index at Help > Scripting Index.

Want more information? Have questions? Get answers in the JMP User Community (community.jmp.com).