Scripting Guide > Extending JMP > Share Reports on JMP Live > Replace the Contents of a JMP Live Report
发布日期: 11/15/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() ));
需要更多信息?有问题?从 JMP 用户社区得到解答 (community.jmp.com).