save report in specified location

Stimulsoft Reports.JS discussion
Post Reply
chandi
Posts: 10
Joined: Thu Apr 01, 2021 4:33 pm

save report in specified location

Post by chandi »

I tried to save report as follows.
var designer = new Stimulsoft.Designer.StiDesigner(options, "StiDesigner", false);
designer.onSaveReport = function (event) {
var jsonStr = event.report.saveToJsonString();
console.log("saving a report");
Stimulsoft.System.StiObject.saveAs(jsonStr, event.fileName + ".mrt", "application/json;charset=utf-8");

}

Report saved in my Downloads folder.
I want to save report in specified folder like "C:\\Reports\".
Much appreciate if anyone can help to my problem.

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

Re: save report in specified location

Post by Lech Kulikowski »

Hello,

Do you want to save the report on the client-side in the specified folder?

Thank you.
chandi
Posts: 10
Joined: Thu Apr 01, 2021 4:33 pm

Re: save report in specified location

Post by chandi »

Yes...I want to save it client-side in the specified folder path.
From the above way it saved in "Downloads" folder.
I want to save report in given folder path like "C:\\Reports\".

Thank You
Lech Kulikowski
Posts: 6196
Joined: Tue Mar 20, 2018 5:34 am

Re: save report in specified location

Post by Lech Kulikowski »

Hello,

Due to the browser security limitations, it is not possible to specify a folder on the client side.

Thank you.
chandi
Posts: 10
Joined: Thu Apr 01, 2021 4:33 pm

Re: save report in specified location

Post by chandi »

Hi Lech,

Thank you for your response.

So this can achieve only on server side.

<cc1:StiWebDesigner ID="StiWebDesigner1" runat="server"
OnCreateReport="StiWebDesigner1_CreateReport"
OnPreviewReport="StiWebDesigner1_PreviewReport"
OnSaveReport="StiWebDesigner1_SaveReport" />

If so, if I try this way can I create a report on client side. not from server side event. Because our main purpose is to use client side functionalities as much as possible.

Looking forward your response.

Thank You
Lech Kulikowski
Posts: 6196
Joined: Tue Mar 20, 2018 5:34 am

Re: save report in specified location

Post by Lech Kulikowski »

Hello,

Due to the browser security limitations, it is not possible to specify a folder on the client side.

Thank you.
Hussain
Posts: 11
Joined: Mon May 01, 2023 5:17 am

Re: save report in specified location

Post by Hussain »

Hi Lech

Still it is not possible to download the file in specific folder in client side?
Lech Kulikowski
Posts: 6196
Joined: Tue Mar 20, 2018 5:34 am

Re: save report in specified location

Post by Lech Kulikowski »

Hello,

No. It is not possible.

Thank you.
Post Reply