This commit is contained in:
2020-09-03 22:19:05 +00:00
parent 06601caac2
commit 96df18c1c5
2 changed files with 5213 additions and 2 deletions

View File

@@ -353,10 +353,11 @@ namespace AyaNova.Biz
await page.AddScriptTagAsync(new AddTagOptions() { Content = report.JsHelpers });
await page.AddStyleTagAsync(new AddTagOptions() { Content = report.Style });
var pagecontent = await page.GetContentAsync();
//compile and run handlebars template
var compileScript = $"let ayReportData=ayPreRender({ReportData});Handlebars.compile(`{report.Template}`)(ayReportData);";
// var compileScript = $"let ayReportData=ayPreRender({ReportData});Handlebars.compile(`{report.Template}`)(ayReportData);";
var compileScript = $"Handlebars.compile(`{report.Template}`)(ayPreRender({ReportData}));";
var resultHTML = await page.EvaluateExpressionAsync<string>(compileScript);
//render report as HTML

File diff suppressed because one or more lines are too long