Saving Reports
There are two options of saving reports in the Blazor Designer component, which are available in the main menu and the main panel of the designer - Save and Save as. At the same time, each of these options of saving has its modes and settings.
Saving reports on the server-side
To save an edited report on the server-side, you should define the OnSaveReport event, which will be invoked when selecting the Save item in the main menu or clicking the Save in the main panel of the designer.
The OnSaveReport event will be invoked when clicking Save. The edited report will be passed in the event arguments. If required, you can use the option of displaying the dialog window with an error or a text message after saving a report. The ErrorCode and ErrorString properties in the arguments of the event are used for this.
In this case, the dialog window with a specified text will be displayed. The text can contain either a save error or a warning message or any other message.
If required, you can access the original report name or report name from the save dialog.
|
Saving on the client-side
To save an edited report on the client-side as a file, you don't need additional designer settings. It's enough to select Save as, when clicking on it, the file saving dialog will be displayed. In this dialog, you can change the name of your report file, and after that, the file will be saved on the local disk of the computer.
The Blazor Designer component changes the behavior of the specified saving variant; there is the OnSaveReportAs event for this. When specifying this action, a report will be saved on the server-side; the work of this action will be analogous to the OnSaveReportAs event.
|
Saving settings
A report is saved in the background mode, i.e., without reloading a page in the browser window. Suppose it is required to control the process of report saving somehow visually. In that case, you should change the SaveReportMode option (or the SaveReportAsMode option) to one of three values - Hidden (set by default), the Visible, or the NewWindow.
If the SaveReportMode option is set to Visible, report saving will be invoked in the current window of the browser in a simple (visible) mode with the help of the POST request. If the SaveReportMode option is set to the NewWindow value, the save report event will be invoked in a new browser window. This option is set to the Hidden value by default, i.e., the report saving is invoked in the background with the help of the AJAX request, and it is not displayed in the browser window. The same values and behavior are available for the SaveReportAsMode option. |