Page 1 of 1

How to get the modified JSON string from Stimulsoft Designer without using onSaveReport event

Posted: Mon Nov 10, 2025 3:51 am
by Tri
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:

Code: Select all

designer.onSaveReport = function (e) {
    var jsonStr = e.report.saveToJsonString();
    console.log(jsonStr);
};
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:

Code: Select all

var currentJson = designer.report.saveToJsonString();

Re: How to get the modified JSON string from Stimulsoft Designer without using onSaveReport event

Posted: Mon Nov 10, 2025 9:49 am
by Lech Kulikowski
Hello,

Sorry, we did not exactly understand your question. You can use the following code:
var currentJson = designer.report.saveToJsonString();

Thank you.