แก้ไขการ export docx และ xlsx

This commit is contained in:
Suphonchai Phoonsawat 2023-08-24 12:56:55 +07:00
parent 160ff2abcf
commit 2cafb0b16f
2 changed files with 4 additions and 1 deletions

View file

@ -87,6 +87,8 @@ namespace BMA.EHR.Report.Service.Controllers
report.DataSource = command;
System.Collections.Hashtable deviceInfo = new System.Collections.Hashtable();
if(exportType == "docx")
deviceInfo["OutputFormat"] = "DOCX";
InstanceReportSource instanceReportSource = new InstanceReportSource()
{
@ -95,7 +97,7 @@ namespace BMA.EHR.Report.Service.Controllers
ReportProcessor reportProcessor = new ReportProcessor(_configuration);
RenderingResult result = reportProcessor.RenderReport(exportType, instanceReportSource, deviceInfo);
RenderingResult result = reportProcessor.RenderReport(exportType.ToUpper(), instanceReportSource, deviceInfo);
var content = result.DocumentBytes;