Beispiel Report als Gadget
Beispiel Gadget aus DocFile und Template (Dateisystem)
Verwenden der toGadget
Beispielconfig gadgetConfig
{
gadgetScript: 'Gadget_ou.cust.demo.filetype.html.report',
gadgetAction: 'build'
}
Beispiel Portalskript
Gadget_ou.cust.demo.filetype.html.report
context.enableModules();
const { Report } = require("ou.sp.Report");
const docFile = context.file;
const report = Report.fromDocFile(docFile, "D:\\EASY\\Workflow-ext\\reports\\ou\\cust\\custom-report.hbs");
context.returnValue = report.toGadget();
context.enableModules();
const { Report } = require("ou.sp.Report");
const report = Report.fromString("<h1>Hello {{name}}</h1>", {
name: "Chuck"
});
context.returnValue = report.toGadget();