Flexmonster Software License Agreement (“Agreement”) has been significantly revised and is effective as of September 30, 2024.
The following modifications were made:
The modified version of Flexmonster Software License Agreement is available here.
Downloading, installing, and/or continuing to use Flexmonster Software after September 30, 2024, constitutes Licensee’s acceptance of the terms and conditions of the modified version of Flexmonster Software License Agreement. If Licensee does not agree to any of these terms and conditions, they must cease using Flexmonster Software and must not download, install, use, access, or continue to access Flexmonster Software. By continuing to use Flexmonster Software or renewing the license under License Model or Maintenance after the effective date of any modifications to Agreement, Licensee accepts and agrees to be bound by the terms and conditions of the modified Agreement.
setReport(report: ReportObject)
[starting from version: 1.4]
Sets a report to be displayed in the component. Use this method to load and show previously saved reports.
Parameter/Type | Description |
---|---|
report ReportObject | Describes the report and contains all its properties. |
1) Set report:
<div id="pivotContainer">The component will appear here</div> <script src="flexmonster/flexmonster.js"></script> <script> var pivot = new Flexmonster({ container: "pivotContainer", componentFolder: "node_modules/flexmonster/", }); </script> <button onclick="setReport()">Set Report</button> <script> function setReport() { var report = { dataSource: { filename: "https://cdn.flexmonster.com/data/data.csv" } } pivot.setReport(report); } </script>
Open the example on JSFiddle.
2) Swap two reports:
<div id="firstPivotContainer">The component will appear here</div> <div id="secondPivotContainer">The component will appear here</div> <script src="flexmonster/flexmonster.js"></script> <script> var pivot1 = new Flexmonster({ container: "firstPivotContainer", componentFolder: "node_modules/flexmonster/", toolbar: true, report: { dataSource: { filename: "data1.csv" } } }); var pivot2 = new Flexmonster({ container: "secondPivotContainer", componentFolder: "node_modules/flexmonster/", toolbar: true, report: { dataSource: { filename: "data2.csv" } } }); </script> <button onclick="javascript: swapReports()">Swap Reports</button> <script> function swapReports() { var report1 = pivot1.getReport(); var report2 = pivot2.getReport(); pivot1.setReport(report2); pivot2.setReport(report1); } </script>
Open on JSFiddle.
getReport
shareReport
ReportObject
open
load
save
Save and restore the report