save(filename:String, destination:String, callbackHandler:String, url:String, embedData:Boolean):String
You can use this method to save your current report to a specified location. Later if open it you will see this saved previously report as it was seen while saving it with all fields, applied filters and sortings same like you placed it.
Returns XML configuration of a report as a String.
filename– a default name of the file.
destination(optional) – parameter defines how to save a generated file. File can be saved to
"clipboard". The default value is
callbackHandler(optional) – JS function which will be called when the report is saved.
url(optional) – an URL to the server-side script which saves the generated file. The file is sent as a POST parameter. Use this parameter only if
embedData(optional) – specifies whether to save CSV/OCSV data within the report or not. Default value is
false. (Available since version 2.120)
How to save a report to the local file system:
How to save a report to the server:
flexmonster.save('myreport.xml', 'server', '', 'http://yourserver.com/yourscript.php');
Please note that the server-side script should be created on your back-end to be able save reports to the server. And an url parameter is the path to this server-side script.
How to save a report and perform some JS code right after the report was already saved:
How to save a report to clipboard: