reporting tool for Node.js
npm install sti-report
npm install stimulsoft-reports-js
`How to load and save a report
Create index.js file in the folder, and add the required code:
`js
// Stimulsoft reports module loading
var Stimulsoft = require('stimulsoft-reports-js');// Loading fonts
Stimulsoft.Base.StiFontCollection.addOpentypeFontFile("Roboto-Black.ttf");
// Creating a new report object
var report = Stimulsoft.Report.StiReport.createNewReport();
// Loading a report template (MRT) into the report object
report.loadFile("report1.mrt");
// Renreding the report
report.renderAsync(() => {
}
// Exporting the report to PDF
report.exportDocumentAsync((pdfData) => {
}
// Saving the report object into a template file (MRT)
report.saveFile("report2.mrt");
// Saving the rendered report object into a document file (MDC)
report.saveDocumentFile("report3.mdc");
`How to run
Open console and run index.js
`
node index
``Read more about Stimulsoft Reports.JS
You can try the Live Demo
More information in the Online Documentation