Saving Reports
Information |
Since dashboards and reports use the same unified template format - MRT, methods for loading the template and working with data, the word “report” will be used in the documentation text.
|
The HTML5 Designer component has two ways of saving the report which are available in the main menu and in the main panel of the designer - Save Report and Save As. In turn, each of these ways has its own modes and settings.
Saving a report and dashboard on the server side
To save the edited report on the server side, you should set the onSaveReport special event which will be called when you select the Save Report menu item or click the Save button on the main panel of the designer. An editable report will be passed in the arguments of the event. That report can be saved, for example, in a JSON string and then transferred to the server side.
By default, after saving the report, the designer continues working without displaying any messages. If necessary, after saving the report, it is possible to display a dialog box with an error or a text message. The special static function showError() is intended for this.
You can get a report name from the designer save dialog or an original report name.
The function takes the error text and a flag as arguments that define the type of the window. The text can contain either a save error message or a warning, or any other message. If true is set as the second argument of the function, then an error window will be displayed. If false is set, the pop-up window with the error message will be displayed.
|
Saving reports and dashboards on the client side
|