Gaaaar, that fixed it. I've been trying to find a solution for a couple of days-worth of time for the past week, so thank you!
Posts made by lcrumb
-
RE: chrome pdf generation timed out
-
chrome pdf generation timed out
Hello,
Just installed the latest version of JSReport Server. When i start it from the command line using "jsreport start" everything works fine. However, when running from a service after running "jsreport win-install", none of the chrome-pdf or chrome-image recipes work. The error is:
*Report "test" render failed.
chrome pdf generation timed out
Error: chrome pdf generation timed out
at module.exports (C:\jsreport\node_modules@jsreport\jsreport-core\lib\shared\createError.js:10:13)
at WorkerReporter.createError (C:\jsreport\node_modules@jsreport\jsreport-core\lib\shared\reporter.js:53:12)
at Timeout._onTimeout (C:\jsreport\node_modules@jsreport\jsreport-chrome-pdf\lib\conversion.js:423:30)
at listOnTimeout (node:internal/timers:581:17)
at process.processTimers (node:internal/timers:519:7)*I've copied the puppeteer folder to the appropriate user profile of the profile used to run the installation of jsreport.
-
RE: v2.x "Enterprise License Expired"
Ok, we never had a license for the enterprise version, so it's strange that this message just started showing this morning. Even stranger that it was working with 8 templates without an enterprise license. In any case, I removed 4 (they were the included samples) and it works again.
-
v2.x "Enterprise License Expired"
Hi All,
We're getting that message in the error log. It's been a while since we installed it. I don't even remember the licensing process, but what can I do to at least get it running again, even if it's in "free" mode?
-
RE: Xlsx Chart
By "taking into account the variables that I've pointed out above" I mean there can be x number of market categories and x number of months. This is where I'm stuck.
-
Xlsx Chart
Hello,
I've been tasked to create an XLSX report. The image below is the desired result, with the "..." added by me in order to indicate to you that a report can have any number of columns (market category) and rows (month of a year). In this case, there are two market categories (Survey - Energy Field and Survey - Energy Office) and the first 10 months of 2020. But a report could contain more market categories and more (or less) months. And the title of the chart could be anything (in this case it is Energy 2020).
I've looked at the example Xlsx Chart report, and it is somewhat helpful. I can create the basic template, but I would like to know how to generate the report taking into account the variables that I've pointed out above.
-
RE: Async = true and output name
duh, nevermind. That's what the "blobName" field is for. Thanks Jan.
-
RE: Async = true and output name
I see that the subsequent files of the same name are overwritten on the server. What if two different users create two different reports with the same name? If the first user doesn't download theirs in time, the may end up downloading the second users report instead. Is that right? That may have been something you've addressed before, but I'm not sure.
-
RE: Async = true and output name
That works! A mouthful, and maybe not super intuitive, but it works. Thanks Jan.
-
RE: Async = true and output name
Actually, no. The filename indicated in the response header when requesting the attachment is the template name (that is, the name of the template in the jsreport studio). It isn't the name indicated when setting the "blobName" property in the request.
For example, say i've got a template named RevenueReport. I make the request for the report, setting options:
{ "options": { "reports": { "async": true, "blobName": "LastQuarterRevenueReport" } }
This creates a file called "LastQuarterRevenueReport.xlsx" on the server as expected, but when the file is requested with http://myjsereportserver/reports/8X2FZ2iqphQZp7uR/attachment, the file is named "RevenueReport.xlsx", not LastQuarterRevenueReport.xlsx. The response header doesn't say Content-Disposition: attachment; filename="LastQuarterRevenueReport.xlsx", it says Content-Disposition: attachment; filename="RevenueReport.xlsx".
Shouldn't it say Content-Disposition: attachment; filename="LastQuarterRevenueReport.xlsx", as indicated in the "blobName" property?
-
RE: Async = true and output name
I've figured it out. The url returned in the "Location" header is the content route. If I change it to attachment, then the file is returned with the name given in the "blobName" property. Otherwise, the file is named "Content.xlsx". Makes sense.
-
RE: Async = true and output name
It comes back as content.xlsx when I do that.
-
RE: Async = true and output name
So, I noticed https://github.com/jsreport/jsreport-reports/commit/0308ed26c9fd0e93a9aaa68401089b1f87a5f835 and that it is from last year. However, it doesn't seem to be in the most recent version of JSReport. Or if it is, it doesn't seem to work. Is it not supposed to be:
"options":{"reportName": "SomeName.xlsx"}
Is there still no way to set the report name? This is for when async is true, by the way.
-
allowedModules issue
Hi,
I'm trying to use the request module. I've added the wildcard to the allowedModules section of the config and restarted JSReport:
"scripts": {
"allowedModules": ["*"],
"timeout": 1000000
}But it sill get an error as follows:
Error: Unsupported module in scripts: request. To enable require on particular module, you need to update the configuration as {"scripts": { "allowedModules": ["request"] } } ... Alternatively you can also set "*" to allowedModules to enable everything
at _require (C:\jsreport\node_modules\jsreport-scripts\lib\scriptEvalChild.js:44:11)
at evalmachine.<anonymous>:1:17
at ContextifyScript.Script.runInContext (vm.js:59:29)
at ContextifyScript.Script.runInNewContext (vm.js:65:15)
at Object.runInNewContext (vm.js:135:38)
at module.exports (C:\jsreport\node_modules\jsreport-scripts\lib\scriptEvalChild.js:123:6)
at process.<anonymous> (C:\jsreport\node_modules\script-manager\lib\worker-processes.js:48:36)
at emitTwo (events.js:125:13)
at process.emit (events.js:213:7)
at emit (internal/child_process.js:774:12)What exactly am I doing wrong here? We're on 1.8.2 and can't upgrade any time soon, by the way.
-
RE: Async = true and output name
I added this to reports.js and it will do what I need for the time being:
app.get('/reports/:id/attachment/:filename', function (req, res, next) { serveReport(req, res).then(function (result) { res.setHeader('Content-Disposition', 'attachment; filename="' + req.params.filename +'"') result.stream.pipe(res) }).catch(next) })
-
Async = true and output name
Hello,
Using the API and setting options to:
"options": { "reportName" : "myfile", "reports": { "async": true } }
or
"options": { "Content-Disposition": "attachment; filename=myfile.pdf", "reports": { "async": true } }
doesn't set the filename. Is there something I'm doing wrong?
-
RE: Return Link to File Only
Instead of returning the report itself in the response, we would just like to return a link to the generated file. Similar to what is done at around 23 minutes into your deep dive (the "Save" option). However, in the deep dive, the file is also returned. We would only want the link returned.
-
Return Link to File Only
Hi All,
We're still running pre v2.x jsreport Server here locally. It's been great. We have the need now to return links to files (not saved indefinitely) instead of streaming the content back. This is due to iOS 12 having blob problems and our method for displaying the result no longer works. We haven't been able to find a solution, so our thinking is to return links instead. How can that be done?