When embedded report has report parameters (inputs) in some cases it is useful to save user-entered values and restore them on next time when the report is opened. This behaviour may be easily added with simple JS code that should be added to the 'host' web page in addition to the iFrame:
parameter_change_notify=1
URL parameter in iFrame's src to enable a callback from
iFrame to the 'parent' web-page; in this way you'll able to save user's input each time when parameters are changed. For example:
<iframe id="embedded_report" name="embedded_report" border="0" frameborder="0" width="800" height="600" scrolling="no" style="overflow:hidden" src="https://www.seektable.com/public/report/1b0509d283904b4995f6968bdd4793f7?parameter_change_notify=1¶meter=filter_year,filter_country"></iframe>
window.addEventListener("message", function (event) { if (!event.data) return; var msg = JSON.parse(event.data); switch (msg.action) { case "onReportParametersChanged": console.log('save='+JSON.stringify(msg.result)); // js code that saves parameters for the report in the iFrame is here break; } });
report_parameters
in the iFrame's URL.Online demo that saves embedded report parameters in the localStorage: restore user-entered parameters example.