Scripting Guide > Extending JMP > Share Reports on JMP Live > Replace the Contents of a JMP Live Report
Publication date: 05/24/2021

Replace the Contents of a JMP Live Report

You can replace the contents of an existing report rather than creating a new report with updated content. You need to know the ID of the report you want to replace. If you have the report object available, you can use the Get ID( ) function to return the ID.

The following example creates a new JMP Live Report called webreport2, adds an updated Oneway report, and replaces an existing Oneway report using the report ID:

// Create an empty JMP Live Report.
webreport2 = New Web Report();

/* Add a Oneway report to webreport3. A title is required and a description is optional. */

webreport2 << Add Report( oneway, Title( "New Oneway Report" ), Description( "Replace a report" ));
/* Use the JMP Live Connection you established to replace the report with the specified ID with webreport2. */
liveconnection << Replace( webreport2, ID(report << Get ID() ));
Want more information? Have questions? Get answers in the JMP User Community (community.jmp.com).