public IActionResult ReportDesigner()
        {
            string Report = "demoreport";

            var       reportPath = HostEnvironment.WebRootPath + "\\Reports\\" + Report + ".mrt";
            StiReport report     = new StiReport();

            //report.Load(reportPath);

            ///What is the code for desgining from  json her
            ///The link to json is , considering that the json api is protected
            ///http://localhost:52507/api/Reports/GetEmployees

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

            var jsonString = "{ }"; // Your code to autorization and get JSON string
            var dataSet    = StiJsonToDataSetConverter.GetDataSet(jsonString);

            report.RegData("ConnectionName", dataSet);
            report.Dictionary.Synchronize();



            return(StiNetCoreDesigner.GetReportResult(this, report));
        }
        public IActionResult GetReport()
        {
            var report = new StiReport();

            //Load and add font to the resources
            var fileContent = System.IO.File.ReadAllBytes(StiNetCoreHelper.MapPath(this, "Fonts/Roboto-Black.ttf"));
            var resource    = new StiResource("Roboto-Black", "Roboto-Black", false, StiResourceType.FontTtf, fileContent, false);

            report.Dictionary.Resources.Add(resource);

            //Add resource font to the font collection
            StiFontCollection.AddResourceFont(resource.Name, resource.Content, "ttf", resource.Alias);

            //Create a text component
            var dataText = new StiText();

            dataText.ClientRectangle = new RectangleD(1, 1, 3, 2);
            dataText.Text            = "Sample Text";
            dataText.Font            = StiFontCollection.CreateFont("Roboto-Black", 12, FontStyle.Regular);
            dataText.Border.Side     = StiBorderSides.All;

            report.Pages[0].Components.Add(dataText);

            return(StiNetCoreDesigner.GetReportResult(this, report));
        }
Esempio n. 3
0
        public IActionResult GetReport(string reportPath, string dataKey = null)
        {
            if (!string.IsNullOrWhiteSpace(reportPath))
            {
                EnsureAllowAccess(reportPath);

                var report = new StiReport();

                string contentRootPath = _hostingEnvironment.ContentRootPath;
                Stimulsoft.Base.StiLicense.LoadFromFile(contentRootPath + "/Stimulsoft/license.key");

                report.Load(StiNetCoreHelper.MapPath(this, reportPath));
                // report.Dictionary.Variables["OrganizationName"].Value = "AwoNore";
                // report.Dictionary.Variables["OrganizationLogo"].Value = $"{Request.Scheme}://{Request.Host}{""}";
                if (!string.IsNullOrWhiteSpace(dataKey))
                {
                    var reportDatasource = _context.HttpContext.Session.Get <List <ReportDatasourceModel> >(dataKey);
                    foreach (var item in reportDatasource)
                    {
                        report.RegData(item.Name, item.Name, item.Value);
                    }
                    report.Render();
                }
                return(StiNetCoreDesigner.GetReportResult(this, report));
            }
            else
            {
                //Raise error path is empty;
                return(null);
            }
        }
Esempio n. 4
0
        public IActionResult GetReport()
        {
            StiReport report = new StiReport();

            report.Load(StiNetCoreHelper.MapPath(this, "Reports/TwoSimpleLists.mrt"));

            return(StiNetCoreDesigner.GetReportResult(this, report));
        }
        public IActionResult GetReport()
        {
            StiReport report = new StiReport();

            report.Load(StiNetCoreHelper.MapPath(this, "Reports/relatorio_teste.mrt"));

            return(StiNetCoreDesigner.GetReportResult(this, report));
        }
        public IActionResult GetReport(string id)
        {
            var report = StiReport.CreateNewDashboard();

            report.Load(StiNetCoreHelper.MapPath(this, "/Dashboards/" + id + ".mrt"));

            return(StiNetCoreDesigner.GetReportResult(this, report));
        }
        public IActionResult GetReport(string id)
        {
            var report = new StiReport();

            report.Load(StiNetCoreHelper.MapPath(this, $"Dashboards/{id}.mrt"));

            return(StiNetCoreDesigner.GetReportResult(this, report));
        }
Esempio n. 8
0
        public IActionResult GetReport(string id = "SimpleList")
        {
            // Create the report object and load data from xml file
            var report = new StiReport();

            report.Load(StiNetCoreHelper.MapPath(this, "/Reports/" + id + ".mrt"));

            return(StiNetCoreDesigner.GetReportResult(this, report));
        }
Esempio n. 9
0
        public IActionResult GetReport()
        {
            // You can use report string or path to report template MRT file
            string reportString = System.IO.File.ReadAllText(_hostEnvironment.WebRootPath + "\\reports\\SimpleList.mrt");

            return(StiNetCoreDesigner.GetReportResult(this, reportString));

            //return StiNetCoreDesigner.GetReportResult(this, _hostEnvironment.WebRootPath + "\\reports\\SimpleList.mrt");
        }
        public async Task <IActionResult> GetReport()
        {
            StiReport report = new StiReport();


            report.Load(StiNetCoreHelper.MapPath(this, "Reports/payments-preset.mrt"));


            return(StiNetCoreDesigner.GetReportResult(this, report));
        }
        public IActionResult GetReport()
        {
            // Loading the report template
            var reportPath = StiNetCoreHelper.MapPath(this, "Reports/TwoSimpleLists.mrt");
            var report     = new StiReport();

            report.Load(reportPath);

            return(StiNetCoreDesigner.GetReportResult(this, report));
        }
        public IActionResult GetReport()
        {
            // Create the dashboard object
            var report = StiReport.CreateNewDashboard();

            // Load dashboard template
            report.Load(StiNetCoreHelper.MapPath(this, "Dashboards/DashboardChristmas.mrt"));

            // Return template to the Designer
            return(StiNetCoreDesigner.GetReportResult(this, report));
        }
Esempio n. 13
0
        public IActionResult GetReport(string selectedreport)
        {
            var report = new StiReport();

            if (!string.IsNullOrWhiteSpace(selectedreport))
            {
                report.Load(StiNetCoreHelper.MapPath(this, $"Reports/{selectedreport}.mrt"));
            }

            return(StiNetCoreDesigner.GetReportResult(this, report));
        }
Esempio n. 14
0
        public IActionResult GetReport()
        {
            var report = new StiReport();

            //Adding a connection to the report from code
            var database = new CustomPostgreSQLDatabase("CustomData1", "Server=127.0.0.1; Port=5432; Database=myDataBase; User Id=myUsername; Password=myPassword;");

            report.Dictionary.Databases.Add(database);

            return(StiNetCoreDesigner.GetReportResult(this, report));
        }
        public IActionResult PreviewReport()
        {
            StiReport report = StiNetCoreDesigner.GetActionReportObject(this);

            DataSet data = new DataSet("Demo");

            data.ReadXml(StiNetCoreHelper.MapPath(this, "Reports/Data/Demo.xml"));

            report.RegData(data);

            return(StiNetCoreDesigner.GetReportResult(this, report));
        }
Esempio n. 16
0
        private IActionResult GetReportResult()
        {
            var dataSet = new DataSet();
            var data    = StiNetCoreHelper.MapPath(this, "Reports/TwoSimpleLists.mrt");
            var mrt     = StiNetCoreHelper.MapPath(this, "Reports/Data/Demo.xml");

            dataSet.ReadXml(mrt);
            var report = new StiReport();

            report.Load(data);
            report.RegData(dataSet);
            report.Dictionary.Synchronize();

            return(StiNetCoreDesigner.GetReportResult(this, report));
        }
Esempio n. 17
0
 public IActionResult GetReport()
 {
     return(StiNetCoreDesigner.GetReportResult(this, _hostEnvironment.WebRootPath + "\\reports\\SimpleList.mrt"));
 }
Esempio n. 18
0
        public IActionResult GetReport()
        {
            var report = Helpers.Dashboard.CreateTemplate();

            return(StiNetCoreDesigner.GetReportResult(this, report));
        }
Esempio n. 19
0
        public IActionResult GetReport()
        {
            StiReport report = new StiReport();

            return(StiNetCoreDesigner.GetReportResult(this, report));
        }