Example #1
0
 public ActionResult GetDesignReport()
 {
     try
     {
         if (!string.IsNullOrEmpty(Request.QueryString["DataMethod"]))
         {
             var info = new ReportProvider().GetType().GetMethod(Request.QueryString["DataMethod"]);
             if (info != null)
             {
                 var invoke = info.Invoke(info, string.IsNullOrEmpty(Request.QueryString["DataMethodParamets"]) ? null : new[] { Request.QueryString["DataMethodParamets"] });
                 if (invoke != null)
                 {
                     var report = new StiReport();
                     report.Load((byte[])invoke);
                     return(StiMvcDesigner.GetReportResult(report));
                 }
             }
         }
         return(null);
     }
     catch (Exception ex)
     {
         return(null);
     }
 }
Example #2
0
        public ActionResult OpenReport()
        {
            StiRequestParams requestParams = StiMvcDesigner.GetRequestParams();

            System.Web.HttpContext.Current.Session["CurrentStimulsoftFileNameToDesign"] = requestParams.Designer.FileName;
            return(StiMvcDesigner.GetReportResult());
        }
Example #3
0
        public ActionResult GetReport()
        {
            var appPath   = Server.MapPath("~/");
            var dashboard = Helpers.Dashboard.CreateTemplate(appPath);

            return(StiMvcDesigner.GetReportResult(dashboard));
        }
Example #4
0
        public ActionResult PreviewReport()
        {
            StiReport report = StiMvcDesigner.GetActionReportObject();

            RegisterReportData(report);

            return(StiMvcDesigner.PreviewReportResult(report));
        }
Example #5
0
        public ActionResult GetReport()
        {
            StiReport report = new StiReport();

            report.Load(Server.MapPath("~/Content/Reports/TwoSimpleLists.mrt"));

            return(StiMvcDesigner.GetReportResult(report));
        }
Example #6
0
        public ActionResult GetReport(string id)
        {
            var report = StiReport.CreateNewDashboard();

            report.Load(Server.MapPath($"~/Dashboards/{id}.mrt"));

            return(StiMvcDesigner.GetReportResult(report));
        }
Example #7
0
        public ActionResult SaveReport()
        {
            var report = StiMvcDesigner.GetReportObject();

            report.Save(Server.MapPath("~/Content/Reports/TwoSimpleLists.mrt"));

            return(StiMvcDesigner.SaveReportResult());
        }
Example #8
0
        public ActionResult SaveReportDesigner()
        {
            StiReport report       = StiMvcDesigner.GetReportObject();
            string    packedReport = report.SavePackedReportToString();


            report.SavePackedReport(Server.MapPath("~/Content/Reports/" + reportName));
            return(StiMvcDesigner.SaveReportResult());
        }
Example #9
0
        public ActionResult GetReport()
        {
            var report = new StiReport();

            report.Load(Server.MapPath("~/Content/Reports/TwoSimpleLists.mrt"));
            report.Dictionary.Databases.Clear();

            return(StiMvcDesigner.GetReportResult(report));
        }
Example #10
0
        public ActionResult CreateReport()
        {
            if (System.Web.HttpContext.Current.Session["CurrentStimulsoftFileNameToDesign"] != null)
            {
                System.Web.HttpContext.Current.Session.Remove("CurrentStimulsoftFileNameToDesign");
            }

            return(StiMvcDesigner.GetReportResult(new StiReport()));
        }
        public ActionResult GetReport()
        {
            var report = StiReport.CreateNewReport();
            var path   = Server.MapPath("~/Reports/MasterDetail.mrt");

            report.Load(path);

            return(StiMvcDesigner.GetReportResult(report));
        }
Example #12
0
        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 GetReport(string id)
        {
            // Create the report object and load data from xml file
            var report = new StiReport();

            report.Load(Server.MapPath("~/Content/ReportTemplates/" + id + ".mrt"));

            return(StiMvcDesigner.GetReportResult(report));
        }
        public ActionResult PreviewReport()
        {
            StiReport report = StiMvcDesigner.GetActionReportObject();
            var       dados  = Help.RetornarPessoas();

            report.RegBusinessObject("Pessoa", dados);
            report.Dictionary.SynchronizeBusinessObjects(2);

            return(StiMvcDesigner.PreviewReportResult(report));
        }
        public ActionResult GetReport()
        {
            // Loading the report template
            var reportPath = Server.MapPath("~/Content/Reports/TwoSimpleLists.mrt");
            var report     = new StiReport();

            report.Load(reportPath);

            return(StiMvcDesigner.GetReportResult(report));
        }
        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()
        {
            var report = StiMvcDesigner.GetReportObject();

            var path = Server.MapPath("~/Reports/MasterDetail.mrt");

            report.Save(path);

            return(StiMvcDesigner.SaveReportResult());
        }
Example #18
0
        string reportName = "alvara2.mrt"; //or "alvara.mrt"
        public ActionResult GetReport()
        {
            StiReport report = new StiReport();

            report.Load(Server.MapPath($"~/Content/Reports/{reportName}"));

            RegisterReportData(report);

            return(StiMvcDesigner.GetReportResult(report));
        }
        public ActionResult GetReport()
        {
            StiReport report = new StiReport();

            report.Load(Server.MapPath("~/Content/Reports/TwoSimpleLists.mrt"));
            var dados = Help.RetornarPessoas();

            report.RegBusinessObject("Pessoa", dados);
            report.Dictionary.SynchronizeBusinessObjects(2);
            return(StiMvcDesigner.GetReportResult(report));
        }
Example #20
0
        public ActionResult GetReport()
        {
            StiReport report = new StiReport();

            if (System.Web.HttpContext.Current.Session["CurrentStimulsoftFileNameToDesign"] != null)
            {
                report.Load(System.Web.HttpContext.Current.Session["CurrentStimulsoftFileNameToDesign"].ToString());
            }

            return(StiMvcDesigner.GetReportResult(report));
        }
        public ActionResult GetReport()
        {
            // Create the dashboard object
            var report = StiReport.CreateNewDashboard();

            // Load dashboard template
            report.Load(Server.MapPath("~/Dashboards/DashboardChristmas.mrt"));

            // Return template to the Designer
            return(StiMvcDesigner.GetReportResult(report));
        }
        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());
        }
Example #23
0
        public ActionResult PreviewReport()
        {
            DataSet data = new DataSet("Demo");

            data.ReadXml(Server.MapPath("~/Content/Data/Demo.xml"));

            StiReport report = StiMvcDesigner.GetActionReportObject();

            RegisterReportData(report);

            return(StiMvcDesigner.PreviewReportResult(report));
        }
Example #24
0
        public ActionResult PreviewReport()
        {
            var data = new DataSet("Demo");

            data.ReadXml(Server.MapPath("~/Content/Data/Demo.xml"));

            var report = StiMvcDesigner.GetActionReportObject();

            report.RegData(data);

            return(StiMvcDesigner.PreviewReportResult(report));
        }
        public ActionResult PreviewReport()
        {
            var       reportTempData = TempData[Helpers.TempReportName] as ReportList;
            StiReport report         = StiMvcDesigner.GetActionReportObject();

            //var dados = Help.RetornarPessoas();
            //report.RegBusinessObject("Pessoa", dados);
            //report.Dictionary.SynchronizeBusinessObjects(2);
            report = ReportData.RegisterData(reportTempData.Data, report);
            TempData[Helpers.TempReportName] = reportTempData;

            return(StiMvcDesigner.PreviewReportResult(report));
        }
        public ActionResult GetReport()
        {
            var       reportTempData = TempData[Helpers.TempReportName] as ReportList;
            StiReport report         = new StiReport();

            //report.Load(Server.MapPath("~/Content/Reports/TwoSimpleLists.mrt"));
            report.Load(Server.MapPath($"~/Content/Reports/{reportTempData.Name}.mrt"));

            report = ReportData.RegisterData(reportTempData.Data, report);
            TempData[Helpers.TempReportName] = reportTempData;

            return(StiMvcDesigner.GetReportResult(report));
        }
        public ActionResult PreviewReport()
        {
            // Get the report template
            StiReport report = StiMvcDesigner.GetActionReportObject();

            // Register data, if necessary
            var data = new DataSet("Demo");

            data.ReadXml(Server.MapPath("~/Content/Data/Demo.xml"));
            report.Dictionary.Databases.Clear();
            report.RegData(data);

            // Return the report snapshot result to the client
            return(StiMvcDesigner.PreviewReportResult(report));
        }
        public ActionResult GetReport()
        {
            var report = new StiReport();

            report.Load(Server.MapPath("~/Content/Reports/MyTwoSimpleLists.mrt"));

            // Add System.Web.Mvc.dll library to the report references
            var assemblies = new string[report.ReferencedAssemblies.Length + 1];

            Array.Copy(report.ReferencedAssemblies, assemblies, report.ReferencedAssemblies.Length);
            assemblies[assemblies.Length - 1] = "System.Web.Mvc.dll";
            report.ReferencedAssemblies       = assemblies;

            return(StiMvcDesigner.GetReportResult(report));
        }
Example #29
0
        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());
        }
Example #30
0
 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);
     }
 }