public IActionResult PreviewReport() { StiReport report = StiNetCoreDesigner.GetActionReportObject(this); return(StiNetCoreDesigner.PreviewReportResult(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.PreviewReportResult(this, report)); }
public IActionResult PreviewReport() { // Get the report template StiReport report = StiNetCoreDesigner.GetActionReportObject(this); // Register data, if necessary var data = new DataSet("Demo"); data.ReadXml(StiNetCoreHelper.MapPath(this, "Data/Demo.xml")); report.Dictionary.Databases.Clear(); report.RegData(data); // Return the report snapshot result to the client return(StiNetCoreDesigner.PreviewReportResult(this, report)); }
public IActionResult PreviewReport() { // Getting a preview report var report = StiNetCoreDesigner.GetActionReportObject(this); // Deleting connections in the report template report.Dictionary.Databases.Clear(); // Loading data from the XML file var dataPath = StiNetCoreHelper.MapPath(this, "Reports/Data/Demo.xml"); var data = new DataSet(); data.ReadXml(dataPath); // Registering data in the report report.RegData(data); // Syncing the data structure, if required //report.Dictionary.Synchronize(); return(StiNetCoreDesigner.PreviewReportResult(this, report)); }
public IActionResult PreviewReport(string reportPath, string dataKey = null) { EnsureAllowAccess(reportPath); // Get the report template var report = StiNetCoreDesigner.GetActionReportObject(this); // report.Dictionary.Variables["OrganizationName"].Value = "Awronore"; // 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 the report snapshot result to the client return(StiNetCoreDesigner.PreviewReportResult(this, report)); }
public async Task <IActionResult> ExportReport([FromQuery] Guid template) { var report = StiNetCoreDesigner.GetActionReportObject(this); return(await StiNetCoreDesigner.ExportReportResultAsync(this, report)); }