diff --git a/server/AyaNova/biz/ReportBiz.cs b/server/AyaNova/biz/ReportBiz.cs index d3220792..1445ec1a 100644 --- a/server/AyaNova/biz/ReportBiz.cs +++ b/server/AyaNova/biz/ReportBiz.cs @@ -357,7 +357,7 @@ namespace AyaNova.Biz //compile and run handlebars template // var compileScript = $"let ayReportData=ayPreRender({ReportData});Handlebars.compile(`{report.Template}`)(ayReportData);"; - var compileScript = $"Handlebars.compile(`{report.Template}`)(ayPreRender({ReportData}));"; + var compileScript = $"Handlebars.compile(`{report.Template}`)({{ayReportData:ayPreRender({ReportData})}});"; var resultHTML = await page.EvaluateExpressionAsync(compileScript); //render report as HTML