Table of contents



[starting from version: 2.302]

You can use this method to save your current report to a specified location. Thus you can open it later with all fields, applied filters, and sortings same like you placed it. The report is saved in JSON format.


params object can have the following properties:

  • filename – a default name of the file.
  • destination (optional) – parameter defines how to save a generated file. File can be saved to "server" or "file". The default value is "file".
  • 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 destination parameter is "server".
  • embedData (optional) – specifies whether to save CSV/OCSV data within the report or not. Default value is false.
  • reportType (optional) – String. Report can be saved in "json" or "xml" format. Default value is "json".
  • withDefaults (optional) – Boolean. Indicates whether the default values for options will be included in the report (true) of not (false). The default value is false.
  • withGlobals (optional) – Boolean. Indicates whether the options defined in global object will be included in the report (true) of not (false). The default value is false.


1) How to save a report to the local file system:{
    filename: 'myreport.json', 
    destination: 'file'

Check out on JSFiddle.

2) How to save a report to the server:{
    filename: 'myreport.json', 
    destination: 'server',
    url: ''

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.

3) How to save a report and perform some JS code right after the report was already saved:

<button onclick="javascript:{
    filename: 'myreport.json', 
    destination: 'file',
    callbackHandler: 'reportSaved'
	Save Report
<script type="text/javascript">
	function reportSaved() {
	// some JS code 

See also