Skip to content

Commit c592b4a

Browse files
committed
could be worse?
1 parent 3408331 commit c592b4a

File tree

2 files changed

+28
-23
lines changed

2 files changed

+28
-23
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Rather, I wanted to
2020

2121
#### **RANT**
2222

23-
JSReport, as far as I'm aware, is the only business reports company whose code base, top to bottem, is all open source and free for anyone to use. More impressively, they have intentionally architected their application as a collection of loosely coupled functional parts (extensions) that can be repurposd, mixed and matched, to perform useful work outside of their original Web GUI, Studio context. That is to say, outside the context where they make money for JSReport the business. And to top it all off, the core functionality on offer here, templating and doc gen, is **fucking legit**. Endless kudos.
23+
JSReport, as far as I'm aware, is the only business reports company whose code base, top to bottem, is all open source and free for anyone to use. More impressively, they have intentionally architected their application as a collection of loosely coupled functional parts (extensions) that can be repurposd, mixed and matched, to perform useful work outside of their original Web GUI, Studio context. That is to say, outside the context where they make money for JSReport the business. And to top it all off, the core functionality on offer here, templating and doc gen, is **superlative**. Endless kudos.
2424

2525
Software like this really deserves more attention and love, especially given how crazy expensive and frankly predatory so many SaaS services in the space are.
2626

src/js-report/reports/excel-dashboard/excel-dashboard.report.ts

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -30,31 +30,36 @@ export class ExcelDashReport {
3030
),
3131
},
3232
]);
33+
34+
setTimeout(() => {
35+
this.jsReport.template.insertFn<ScriptsTemplate>(
36+
'excel-dashboard',
37+
async () => ({
38+
name: 'excel-dashboard',
39+
recipe: 'html-to-xlsx',
40+
engine: 'handlebars',
41+
scripts: [{ name: 'calculations.js' }],
42+
baseXlsxTemplate: null,
43+
htmlToXlsx: {
44+
htmlEngine: 'chrome',
45+
templateAssetShortid: await this.jsReport.asset.shortId(
46+
'project-portfolio-dashboard-template.xlsx',
47+
),
48+
} as any,
49+
content: fs.readFileSync(
50+
path.join(__dirname, 'template/template.html'),
51+
'utf-8',
52+
),
53+
helpers: fs.readFileSync(
54+
path.join(__dirname, 'template/helpers.js'),
55+
'utf-8',
56+
),
57+
}),
58+
);
59+
});
3360
}
3461

3562
async render(pdf = false, data = excelDashData) {
36-
this.jsReport.template.insert<ScriptsTemplate>({
37-
name: 'excel-dashboard',
38-
recipe: 'html-to-xlsx',
39-
engine: 'handlebars',
40-
scripts: [{ name: 'calculations.js' }],
41-
baseXlsxTemplate: null,
42-
htmlToXlsx: {
43-
htmlEngine: 'chrome',
44-
templateAssetShortid: await this.jsReport.asset.shortId(
45-
'project-portfolio-dashboard-template.xlsx',
46-
),
47-
} as any,
48-
content: fs.readFileSync(
49-
path.join(__dirname, 'template/template.html'),
50-
'utf-8',
51-
),
52-
helpers: fs.readFileSync(
53-
path.join(__dirname, 'template/helpers.js'),
54-
'utf-8',
55-
),
56-
} as any);
57-
5863
return this.jsReport.render({
5964
options: { reportName: 'excel-dashboard' },
6065
template: {

0 commit comments

Comments
 (0)