This commit is contained in:
Ali
2025-05-01 17:08:11 +03:30
committed by alibw
commit de7f960603
8 changed files with 160 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
using Stimulsoft.Report;
using Stimulsoft.Report.Export;
namespace PdfService;
public static class Reporter
{
public static Stream Print(string reportTemplate, object data)
{
var report = new StiReport();
report.LoadFromString(reportTemplate);
report.RegBusinessObject("Data", data);
report.Render(false);
var stream = new MemoryStream();
report.ExportDocument(StiExportFormat.Pdf ,stream);
stream.Position = 0;
return stream;
}
}