Dear Stimulsoft team,
is it possible to change name of file that is being exported from "save" button of StiMvcViewerOptions. We want to change .csv file name from Report.csv to more custom value.
regards,
Iskadnar
Change fileName when exporting from HtmlViewer panel
-
- Posts: 105
- Joined: Thu Aug 17, 2017 12:07 pm
Change fileName when exporting from HtmlViewer panel
- Attachments
-
- csvSeparator.PNG (36.72 KiB) Viewed 4995 times
Re: Change fileName when exporting from HtmlViewer panel
Hello,
You can use the ReportName property of the report.
Thank you.
You can use the ReportName property of the report.
Thank you.
-
- Posts: 105
- Joined: Thu Aug 17, 2017 12:07 pm
Re: Change fileName when exporting from HtmlViewer panel
Hi,
Please give more detailed answer. It is not clear where and how
Regards,
Iskanadr
Please give more detailed answer. It is not clear where and how
Regards,
Iskanadr
-
- Posts: 105
- Joined: Thu Aug 17, 2017 12:07 pm
Re: Change fileName when exporting from HtmlViewer panel
in .cshtml we have
....
and in Controller we have
through this actionResult .csv file is being generated. So where should we put ReportName Property and How
Code: Select all
@Html.Stimulsoft().StiMvcViewer("Report", new StiMvcViewerOptions
{
Actions =
{
ViewerEvent = "ViewerEvent",
PrintReport = "PrintReport"
},
and in Controller we have
Code: Select all
public ActionResult ViewerEvent()
{
return StiMvcViewer.ViewerEventResult();
}
Re: Change fileName when exporting from HtmlViewer panel
Hello,
You can use the following code:
пожалуйста используйте следующий код для этого:
Thank you.
You can use the following code:
пожалуйста используйте следующий код для этого:
Code: Select all
Actions =
{
ViewerEvent = "ViewerEvent",
PrintReport = "PrintReport",
ExportReport = "ExportReport"
},
public ActionResult ExportReport()
{
StiReport report = StiMvcViewer.GetReportObject();
report.ReportName = "ExportReportFileName";
report.ReportAlias = report.ReportName;
return StiMvcViewer.ExportReportResult(report);
}