save

save(parameters:Object)

Saves all current configurations, such as data source, formatting, which data is displayed. All these configurations are saved in a JSON file called report. Such report can be saved both locally and to a server.

Parameters

Gets parameters object as an input parameter. This object can have the following properties:

NameTypeDescription
filenameStringoptional The name of the report file. The default name is report.json.
destinationStringoptional Destination for the download. By default, destination is set to "file", which means the report is saved locally. Set destination as "server" to save the report to the server.
urlStringoptional The URL to the server script saving the report. It is required when saving the report to the server (the report file is passed as a POST parameter).
embedDataBooleanoptional If true, CSV data is embedded within the report. By default, the report with CSV data is saved with the reference to CSV file.
withDefaultsBooleanoptional If true, the report is saved with the default values for all options.
withGlobalsBooleanoptional If true, the report is saved with the options defined in global object.

Example

Save a report with custom name: