public ActionResult SaveReport() { var report = StiMvcDesigner.GetReportObject(); report.Save(Server.MapPath("~/Content/Reports/TwoSimpleLists.mrt")); return(StiMvcDesigner.SaveReportResult()); }
public ActionResult SaveReport() { StiReport report = StiMvcDesigner.GetReportObject(); // Save the report template, for example to JSON string string json = report.SaveToJsonString(); return(StiMvcDesigner.SaveReportResult()); }
public ActionResult SaveReportDesigner() { StiReport report = StiMvcDesigner.GetReportObject(); string packedReport = report.SavePackedReportToString(); report.SavePackedReport(Server.MapPath("~/Content/Reports/" + reportName)); return(StiMvcDesigner.SaveReportResult()); }
public ActionResult SaveReport() { var report = StiMvcDesigner.GetReportObject(); var path = Server.MapPath("~/Reports/MasterDetail.mrt"); report.Save(path); return(StiMvcDesigner.SaveReportResult()); }
public ActionResult SaveReport() { var reportTempData = TempData[Helpers.TempReportName] as ReportList; StiReport report = StiMvcDesigner.GetReportObject(); report.Save(Server.MapPath($"~/Content/Reports/{reportTempData.Name}.mrt")); //report = ReportData.RegisterData(reportTempData.Data, report); TempData[Helpers.TempReportName] = reportTempData; return(StiMvcDesigner.SaveReportResult()); }
public ActionResult SaveReport() { StiReport report = StiMvcDesigner.GetReportObject(); // string packedReport = report.SavePackedReportToString(); // ... // The save report code here // ... // Completion of the report saving without dialog box return(StiMvcDesigner.SaveReportResult()); }
public ActionResult SaveReport() { try { StiReport report = StiMvcDesigner.GetReportObject(); string fileName = System.Web.HttpContext.Current.Session["CurrentStimulsoftFileNameToDesign"] != null ? System.Web.HttpContext.Current.Session["CurrentStimulsoftFileNameToDesign"].ToString() : null; if (fileName != null) { if (!System.IO.File.Exists(fileName)) { throw new Exception(string.Format("Unable to save file \"{0}\"! The path to the file is not available. Please use Sava As.", fileName)); } report.Save(fileName); } else { StiRequestParams requestParams = StiMvcDesigner.GetRequestParams(); string fileNameFullPath = requestParams.Designer.FileName; try { FileStream f = new FileStream(fileNameFullPath, FileMode.Create, FileAccess.Write); f.Close(); report.Save(fileNameFullPath); System.Web.HttpContext.Current.Session["CurrentStimulsoftFileNameToDesign"] = fileNameFullPath; } catch { throw new Exception(string.Format("Unable to save file \"{0}\"! Please enter a valid file name with FULL path.", fileNameFullPath)); } } } catch (Exception e) { System.Web.HttpContext.Current.Session.Remove("CurrentStimulsoftFileNameToDesign"); return(StiMvcDesigner.SaveReportResult(string.Format("An error happened: {0}", e.Message))); } return(StiMvcDesigner.SaveReportResult()); }
public ActionResult SaveReport() { try { StiReport report = StiMvcDesigner.GetReportObject(); if (!string.IsNullOrEmpty(Request.QueryString["UpdateMethod"])) { var info = new ReportProvider().GetType().GetMethod(Request.QueryString["UpdateMethod"]); if (info != null) { info.Invoke(info, string.IsNullOrEmpty(Request.QueryString["UpdateParametrs"]) ? null : new object[] { Request.QueryString["UpdateParametrs"], report.SaveToByteArray() }); } } return(StiMvcDesigner.SaveReportResult()); } catch (Exception ex) { return(null); } }
public ActionResult SaveReportAs() { string fileNameFullPath = ""; try { StiReport report = StiMvcDesigner.GetReportObject(); StiRequestParams requestParams = StiMvcDesigner.GetRequestParams(); fileNameFullPath = requestParams.Designer.FileName; FileStream f = new FileStream(fileNameFullPath, FileMode.Create, FileAccess.Write); f.Close(); report.Save(fileNameFullPath); System.Web.HttpContext.Current.Session["CurrentStimulsoftFileNameToDesign"] = fileNameFullPath; return(StiMvcDesigner.SaveReportResult(report)); } catch { return(StiMvcDesigner.SaveReportResult(string.Format("Unable to save file \"{0}\"! Please enter a valid file name with FULL path.", fileNameFullPath))); } }
public ActionResult SaveReportAs() { return(StiMvcDesigner.SaveReportResult()); }