Skip to main content Skip to footer

How to Autosave in the Report Designer Component

While using the ActiveReportsJS Report Designer Component in your application, you can use the API to automatically save a report's changes during design-time. 

You can use the processCommand method and the getReport method together to execute an autosave everytime the isDirty flag is set to true. It would look something like the following code: 

this.saveIntervalId = setInterval(async () => { const reportInfo = await this.reportDesigner.getReport(); if (reportInfo?.isDirty) { this.reportDesigner.processCommand('save'); } }, 2000);
If you need more help with the process, you can take a look at this documentation.

Christian Wirt