Esempio 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));
        }
Esempio 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));
        }
Esempio n. 4
0
            public async Task <IActionResult> SaveReport([FromQuery] Guid template)
            {
                var report = StiNetCoreDesigner.GetReportObject(this);

                await using var ms = new MemoryStream();
                report.Save(ms);
                ms.Position = 0;

                _memoryCache.Set(template.ToString("D"), ms.ToArray());

                return(await StiNetCoreDesigner.SaveReportResultAsync(this));
            }
        private async Task <IActionResult> SaveReport(Guid key)
        {
            var report = StiNetCoreDesigner.GetReportObject(this);

            await using var ms = new MemoryStream();
            report.Save(ms);
            ms.Position = 0;

            _memoryCache.Set(key.ToString("D"), ms.ToArray());

            return(await StiNetCoreDesigner.SaveReportResultAsync(this));
        }
        private async Task <IActionResult> GetPreview(Guid key)
        {
            var stiReport = StiNetCoreDesigner.GetReportObject(this);

            stiReport.RegBusinessObject("Data", new
            {
                Test = "Test"
            });
            stiReport.Dictionary.SynchronizeBusinessObjects(5);
            await stiReport.Dictionary.SynchronizeAsync();

            return(await StiNetCoreDesigner.PreviewReportResultAsync(this, stiReport));
        }
Esempio n. 7
0
            public async Task <IActionResult> PreviewReport([FromQuery] Guid template)
            {
                var stiReport = StiNetCoreDesigner.GetReportObject(this);

                if (stiReport != null)
                {
                    stiReport.RegBusinessObject("Data", new
                    {
                        Test = "Test"
                    });
                    stiReport.Dictionary.SynchronizeBusinessObjects(5);
                    await stiReport.Dictionary.SynchronizeAsync();
                }

                return(await StiNetCoreDesigner.PreviewReportResultAsync(this, stiReport));
            }
Esempio n. 8
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);
            }
        }
        private async Task <IActionResult> ExportReport(Guid key)
        {
            var report = StiNetCoreDesigner.GetReportObject(this);

            return(await StiNetCoreDesigner.ExportReportResultAsync(this, report));
        }