Exemplo n.º 1
0
        public IActionResult SaveReport()
        {
            StiReport report = StiNetCoreDesigner.GetReportObject(this);

            // Save the report template, for example to JSON string
            string json = report.SaveToJsonString();

            return(StiNetCoreDesigner.SaveReportResult(this));
        }
Exemplo n.º 2
0
        public IActionResult SaveReport()
        {
            StiReport    report = StiNetCoreDesigner.GetReportObject(this);
            StreamWriter sw     = new StreamWriter($"{report.ReportName}.mrt");

            report.Save(sw.BaseStream);
            sw.Close();
            return(StiNetCoreDesigner.SaveReportResult(this));
        }
        public IActionResult SaveReport()
        {
            var report = StiNetCoreDesigner.GetReportObject(this);

            // string packedReport = report.SavePackedReportToString();
            // ...
            // The save report code here
            // ...

            // Completion of the report saving without dialog box
            return(StiNetCoreDesigner.SaveReportResult(this));
        }
Exemplo n.º 4
0
        public IActionResult SaveReport()
        {
            string reportString = StiNetCoreDesigner.GetReportString(this);
            string reportName   = StiNetCoreDesigner.GetReportName(this);

            try
            {
                System.IO.File.WriteAllText(_hostEnvironment.WebRootPath + "\\reports\\" + reportName + ".mrt", reportString);
                return(StiNetCoreDesigner.SaveReportResult(this, true, "The report is saved successfully"));
            }
            catch (Exception e)
            {
                return(StiNetCoreDesigner.SaveReportResult(this, false, "Error at saving: " + e.Message));
            }
        }
Exemplo n.º 5
0
        public IActionResult SaveReport(string reportPath, string dataKey = null)
        {
            if (!string.IsNullOrWhiteSpace(reportPath))
            {
                EnsureAllowAccess(reportPath);

                StiReport report = StiNetCoreDesigner.GetReportObject(this);

                report.Save(StiNetCoreHelper.MapPath(this, reportPath));

                // Completion of the report saving without dialog box
                return(StiNetCoreDesigner.SaveReportResult(this));
            }
            else
            {
                //Raise error path is empty;
                return(null);
            }
        }
Exemplo n.º 6
0
 public IActionResult SaveReportAs()
 {
     return(StiNetCoreDesigner.SaveReportResult(this));
 }