Page 1 of 1

save report in specified location

Posted: Thu Apr 01, 2021 4:44 pm
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

Re: save report in specified location

Posted: Fri Apr 02, 2021 9:14 am
by Lech Kulikowski
Hello,

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

Thank you.

Re: save report in specified location

Posted: Fri Apr 02, 2021 12:55 pm
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

Re: save report in specified location

Posted: Fri Apr 02, 2021 2:52 pm
by Lech Kulikowski
Hello,

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

Thank you.

Re: save report in specified location

Posted: Sat Apr 03, 2021 1:04 am
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

Re: save report in specified location

Posted: Tue Apr 06, 2021 11:15 pm
by Lech Kulikowski
Hello,

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

Thank you.

Re: save report in specified location

Posted: Thu May 11, 2023 1:34 pm
by Hussain
Hi Lech

Still it is not possible to download the file in specific folder in client side?

Re: save report in specified location

Posted: Thu May 11, 2023 9:08 pm
by Lech Kulikowski
Hello,

No. It is not possible.

Thank you.