Do not need show dialog "Save report as" when load template from byte array or stream
Posted: Thu Apr 27, 2023 3:09 pm
Hello, my team and I are currently using "Stimulsoft.Reports.Web.NetCore" Version="2022.1.6". I have encountered a problem where, when I attempt to use SaveReport, the web designer prompts me for a name with a save dialog, even though we are using database-coded Reportfiles with LoadReport from byte array.
I have read a similar problem on viewtopic.php?t=3272; however, I am unsure of how to apply the solution to the current version. I cannot find the StiDesigner class and cannot locate the resource to overwrite the SavingReportInDesigner event.
I want to implement my saving method in the StimulsoftReportcontroller, which is connected to my cshmtl. This is the code I am using:
I have omitted some code that is used to retrieve data from the database, but the Stimulsoft logic remains the same.
I have read a similar problem on viewtopic.php?t=3272; however, I am unsure of how to apply the solution to the current version. I cannot find the StiDesigner class and cannot locate the resource to overwrite the SavingReportInDesigner event.
I want to implement my saving method in the StimulsoftReportcontroller, which is connected to my cshmtl. This is the code I am using:
Code: Select all
public async Task<ActionResult> GetDesignerReport(string id)
{
var json = RequestStorage.Get(id, false);
var report = new StiReport();
return StiNetCoreDesigner.GetReportResult(this, report);
}
public async Task<ActionResult> SaveReport(string id)
{
var requestParams = StiNetCoreDesigner.GetRequestParams(this);
requestParams.Action = StiAction.SaveReport;
var report = StiNetCoreDesigner.GetReportObject(this);
}