Hi
I am trying to use the report builder in our MVC project, it's all working well, apart from the fact that I cannot get it to save anything other then the default report template.
When I call the Save As (the same way as your example code), it appears to be posting correctly looking at the Form Data in Google Dev tools. However once it gets server-side and I use the following code as per your example:
StiReport report = StiMvcMobileDesigner.GetReportObject(HttpContext);
report.Save(Server.MapPath(path + report.ReportName + ".mrt"));
report.ReportName always comes back as "report.mrt".
Any idea what I could be doing wrong?
Kind Regards,
Gareth
Save As dialog being ignored C# MVC
Re: Save As dialog being ignored C# MVC
Hello,
Please try to use the following code:
Thank you.
Please try to use the following code:
Code: Select all
public ActionResult SaveAsReportTemplate()
{
StiReport report = StiMvcMobileDesigner.GetReportObject(HttpContext);
Hashtable parameters = StiMvcMobileDesigner.GetHttpContextParameters(HttpContext);
string fileName = parameters["reportFile"] as string;
report.Save(@"d:\" + fileName);
return StiMvcMobileDesigner.SaveAsReportTemplateResult(HttpContext);
}