How to get the modified JSON string from Stimulsoft Designer without using onSaveReport event
Posted: Mon Nov 10, 2025 3:51 am
I am currently using Stimulsoft Reports.JS (or Stimulsoft Designer in web application) and I need to retrieve the JSON string of the modified report immediately after the user finishes editing in the designer — without requiring them to click the Save button (i.e., outside of the onSaveReport event).
Currently, I can only capture the JSON via the onSaveReport event:
However, I would like to get the current JSON string programmatically at any time (e.g., when a custom "Export" button is clicked), even if the user hasn’t triggered the save action.
Is there a way to access the current report JSON string directly from the designer instance after modifications, for example:
Currently, I can only capture the JSON via the onSaveReport event:
Code: Select all
designer.onSaveReport = function (e) {
var jsonStr = e.report.saveToJsonString();
console.log(jsonStr);
};
Is there a way to access the current report JSON string directly from the designer instance after modifications, for example:
Code: Select all
var currentJson = designer.report.saveToJsonString();