Not the reply I was waiting for ^^
Posts made by omasson-perso
-
RE: RangeError: Invalid string length on large reports
-
RE: RangeError: Invalid string length on large reports
Seems so...
Do you have some services to point me to?
Thanks a lot -
RE: RangeError: Invalid string length on large reports
Hi Jan,
Thanks for your reply.
It's exactly our problem here.. Our output xml file could be big (1Go...)...
Does jsreport implement a feature that merge several small xmls in a final one ? -
RangeError: Invalid string length on large reports
Hi,
We are trying to deliver a big report. We have a template with child templates in order to avoid v8 length limit.
We get this error:
"RangeError: Invalid string length", " at Array.join (<anonymous>)", " at /var/task/node_modules/async-replace-with-limit/async-replace.js:83:31", " at /var/task/node_modules/async-replace-with-limit/node_modules/async/lib/async.js:726:13", " at /var/task/node_modules/async-replace-with-limit/node_modules/async/lib/async.js:52:16", " at replenish (/var/task/node_modules/async-replace-with-limit/node_modules/async/lib/async.js:314:29)", " at /var/task/node_modules/async-replace-with-limit/node_modules/async/lib/async.js:326:29", " at /var/task/node_modules/async-replace-with-limit/node_modules/async/lib/async.js:44:16", " at /var/task/node_modules/async-replace-with-limit/node_modules/async/lib/async.js:723:17", " at /var/task/node_modules/async-replace-with-limit/node_modules/async/lib/async.js:167:37", " at /var/task/node_modules/async-replace-with-limit/async-replace.js:71:21", " at tryCatcher (/var/task/node_modules/jsreport-child-templates/node_modules/bluebird/js/release/util.js:16:23)", " at Promise.successAdapter [as _fulfillmentHandler0] (/var/task/node_modules/jsreport-child-templates/node_modules/bluebird/js/release/nodeify.js:23:30)", " at Promise._settlePromise (/var/task/node_modules/jsreport-child-templates/node_modules/bluebird/js/release/promise.js:566:21)", " at Promise._settlePromise0 (/var/task/node_modules/jsreport-child-templates/node_modules/bluebird/js/release/promise.js:614:10)", " at Promise._settlePromises (/var/task/node_modules/jsreport-child-templates/node_modules/bluebird/js/release/promise.js:694:18)", " at _drainQueueStep (/var/task/node_modules/jsreport-child-templates/node_modules/bluebird/js/release/async.js:138:12)", " at _drainQueue (/var/task/node_modules/jsreport-child-templates/node_modules/bluebird/js/release/async.js:131:9)", " at Async._drainQueues (/var/task/node_modules/jsreport-child-templates/node_modules/bluebird/js/release/async.js:147:5)", " at Immediate.Async.drainQueues (/var/task/node_modules/jsreport-child-templates/node_modules/bluebird/js/release/async.js:17:14)", " at processImmediate (internal/timers.js:461:21)"
Do you know what we should do ?
Thanks a lot,
-
Carriage return text recipe
Hi all,
I'd like to know if it is possible to force the type of carriage return during the report generation.
My server is running on Linux but I want to have a crlf (windows line ending) in the final file.
Thanks a lot,
-
RE: Custom module not found on AWS Lambda
Hi Jan,
Thanks for the quick reply.
After more digging, it appears that my modules are found but not formatted as you expect.
Actually, this is not working :
'use strict'; const _createAccess1 = require('module1'); const _createAccess2 = require("module2"); const _createAccess3 = require('module3'); const _config = require("config"); const _mongoose = require('mongoose'); module.exports = function () { ... }
but this is working :
'use strict'; module.exports = function () { const _createAccess1 = require('module1'); const _createAccess2 = require("module2"); const _createAccess3 = require('module3'); const _config = require("config"); const _mongoose = require('mongoose'); .... }
-
Custom module not found on AWS Lambda
Hi,
We are trying to use jsreport on AWS via Lambda functions but we are stuck with a module problem.
You can see below our project directories :
The custom modules are saved in the scripts folder.
When i try to require a custom module in one of my report content.js, I got the following error on AWS (everything is working well locally and the scripts folder is well uploaded to /var/tasks/scripts/... on my lambda).
{ "errorType": "Error", "errorMessage": "Error while executing user script. Unable to find module ./scripts/database/afpdb\nThe require calls:\nrequire('./scripts/database/afpdb')\nrequire('/var/task/scripts/database/afpdb')\nrequire('/var/runtime/scripts/database/afpdb')\n. \n\n 1 | const _createHelperAfpdb = require('./scripts/database/afpdb');\n | ^\n 2 | const _createHelperCommon = require('./scripts/common');\n 3 | const _createBeforeRenderHandler = require('./scripts/beforerender');\n 4 | const _createHelperIssuer = require('./scripts/database/issuer');\n\n", "trace": [ "Error: Unable to find module ./scripts/database/afpdb", "The require calls:", "require('./scripts/database/afpdb')", "require('/var/task/scripts/database/afpdb')", "require('/var/runtime/scripts/database/afpdb')", "", " at doRequire (/var/task/node_modules/jsreport-core/lib/render/safeSandbox.js:220:11)", " at _require (/var/task/node_modules/jsreport-core/lib/render/safeSandbox.js:66:14)", " at Object.base.apply (/var/task/node_modules/vm2/lib/contextify.js:469:32)", " at evaluate-user-script.js:2:28", " at Script.runInContext (vm.js:130:18)", " at VM.run (/var/task/node_modules/vm2/lib/main.js:219:62)", " at run (/var/task/node_modules/jsreport-core/lib/render/safeSandbox.js:171:19)", " at scriptEvalChild (/var/task/node_modules/jsreport-scripts/lib/scriptEvalChild.js:210:5)", " at scriptExecModuleWrapper (/var/task/node_modules/jsreport-core/lib/scriptExecModuleWrapper.js:34:26)", " at process.<anonymous> (/var/task/node_modules/script-manager/lib/worker-processes.js:66:36)", " at process.emit (events.js:314:20)", " at emit (internal/child_process.js:877:12)", " at processTicksAndRejections (internal/process/task_queues.js:85:21)" ] }
Do you have any idea ?
Thanks a lot,
Regards,
-
RE: Excel : insert row before existing template data
Sorry for my english.
Let's say that we have data in row 1 to 3 (r1old, r2old, r3old).
We want to create a new first row r1new and move the old rows like this :
r1 -> r1new
r2 -> r1old
r3 -> r2old
r4 -> r3oldIs that possible ?
Hopefully, this is understandable.
Regards
-
RE: Excel : insert row before existing template data
Hi Jan,
Thanks a lot for your quick reply. Your code works for simple case.
On our side, we want to create a template with 4 or 5 tables containing a header, but no data.
The script should insert dynamically data in the tables.
Prerequired : we do not know how many rows each table will have before the generation.My question is more on how we could insert row (as we can do in Excel), and not add row.
I hope to be clear enough.
Regards,
-
Excel : insert row before existing template data
Hi all,
I want to insert data before existing row in my template, is that possible ?
As you can see in the playground, my excel sheet is broken...
https://playground.jsreport.net/w/omasson-perso/kI~vx5ayThanks a lot for the help,
Regards,