Programmatically save a changed design report

Stimulsoft Reports.JS discussion
Post Reply
SL_USIS
Posts: 2
Joined: Mon Oct 02, 2023 11:16 pm

Programmatically save a changed design report

Post by SL_USIS »

Hi, How do I save a report in the designer as JSON var without having the user interact with the "save" or "save as" in the designer?

I tried calling

var jsonReport = report.saveToJsonString();

but it just gives me the JSON of the original loaded design, not the modified one.

Thank you
Lech Kulikowski
Posts: 6271
Joined: Tue Mar 20, 2018 5:34 am

Re: Programmatically save a changed design report

Post by Lech Kulikowski »

Hello,

Where do you use your code?
Also, please try to check designer.report.saveToJsonString()

Thank you.
SL_USIS
Posts: 2
Joined: Mon Oct 02, 2023 11:16 pm

Re: Programmatically save a changed design report

Post by SL_USIS »

Hey Lech, never mind. It works, it was a local variable assigned rather than the global variable that I needed to use.

Cheers!
Lech Kulikowski
Posts: 6271
Joined: Tue Mar 20, 2018 5:34 am

Re: Programmatically save a changed design report

Post by Lech Kulikowski »

Hello,

You are welcome.
Post Reply