Awesome, thanks @jan_blaha
Right now I've also did the same i.e. increased the input request limit and it started working fine. :)
piyu37
@piyu37
Posts made by piyu37
-
RE: How js-report input request size calculates?
-
How js-report input request size calculates?
Hi,
I am sending data to js-report in json format which includes object, let's say:
data = {
object a: {object a has 1048 bytes size of data},
object b: {object a has 69168 bytes size of data},
object c: {object a has 38224 bytes size of data},
object d: {object a has 76688 bytes size of data},
object e: {object a has 200 bytes size of data},
object f: {object a has 136 bytes size of data},
object g: {object a has 136 bytes size of data},
object h: {object a has 200 bytes size of data},
object i: {object a has 200 bytes size of data},
object j: {object a has 72 bytes size of data}
}
When I am counting manually the size of these data it's equal to 185,912 bytes(.2 Mb max.) but when this object goes to js-report, the size becomes approx 22Mb and because of that it gives error:
Input request reached limit of 20971520 byte(s)(21 Mb)Now my question is how js-report calculates the input request size when we send a Json to js-report? How it's becoming 22Mb data? And Is there any way to reduce the size of the data?
Please help me in understanding this.
Thanks in advance!! -
RE: ReferenceError: request is not defined
yes it worked, thanks @bjrmatos. In previous version we were using request only and at that time it was working fine. But I suppose it has changed now. Thanks again.
-
ReferenceError: request is not defined
I am getting this error while I am trying to export excel file:
Error when processing render request Error while executing user script. request is not defined. Error on line 3:5.1 | function beforeRender(req, res, done) {
2 | var keys, columns;3 | if(request.data.data.removalListData && request.data.data.removalListData.length){
| ^
4 | keys = Object.keys(request.data.data.removalListData[0]);
5 | columns = [];
6 | keys.forEach(function (k) {ReferenceError: request is not defined
at Object.beforeRender (evaluate-user-script.js:3:5)
at Object.__runBefore (/media/piyush/E/js-report/node_modules/jsreport-scripts/lib/scriptEvalChild.js:107:26)
at Object.apply (/media/piyush/E/js-report/node_modules/vm2/lib/contextify.js:288:34)
at evaluate-user-script.js:25:1
at ContextifyScript.Script.runInContext (vm.js:59:29)
at VM.run (/media/piyush/E/js-report/node_modules/vm2/lib/main.js:212:72)
at run (/media/piyush/E/js-report/node_modules/jsreport-core/lib/render/safeSandbox.js:171:19)
at module.exports (/media/piyush/E/js-report/node_modules/jsreport-scripts/lib/scriptEvalChild.js:166:5)
at process.<anonymous> (/media/piyush/E/js-report/node_modules/script-manager/lib/worker-processes.js:56:36)
at emitTwo (events.js:126:13)It would be really appreciated if anybody will help me in this error? I am using js-report version: 2.3.0.
Thanks in advance. -
RE: Error: Failed to load collection xlsxTemplates Error: Can't insert key NdW7rL9aMMpTdfT6, it violates the unique constraint.
It got resolved Jan. It was coming because my teammate defined same key for 2 different xlsx template. Thanks for helping me.
-
RE: Error: Failed to load collection xlsxTemplates Error: Can't insert key NdW7rL9aMMpTdfT6, it violates the unique constraint.
@jan_blaha Is there any alternative to fix this error temporarily and any reason why this error is coming?
-
Error: Failed to load collection xlsxTemplates Error: Can't insert key NdW7rL9aMMpTdfT6, it violates the unique constraint.
Hi all, I am getting this error. Can anybody know about this error:
error: Failed to load collection xlsxTemplates Error: Can't insert key NdW7rL9aMMpTdfT6, it violates the unique constraint
at _AVLTree.insert (E:\js-report\node_modules\binary-search-tree\lib\avltree.js:273:19)
at AVLTree.insert (E:\js-report\node_modules\binary-search-tree\lib\avltree.js:307:27)
at Index.insert (E:\js-report\node_modules\nedb\lib\indexes.js:77:15)
at Index.insertMultipleDocs (E:\js-report\node_modules\nedb\lib\indexes.js:114:12)
at Index.insert (E:\js-report\node_modules\nedb\lib\indexes.js:69:33)
at Index.reset (E:\js-report\node_modules\nedb\lib\indexes.js:55:23)
at E:\js-report\node_modules\nedb\lib\datastore.js:107:21
at Array.forEach (native)
at Datastore.resetIndexes (E:\js-report\node_modules\nedb\lib\datastore.js:106:29)
at E:\js-report\node_modules\jsreport-fs-store\lib\persistence.js:403:17
at E:\js-report\node_modules\jsreport-fs-store\node_modules\async\dist\async.js:460:16
at iteratorCallback (E:\js-report\node_modules\jsreport-fs-store\node_modules\async\dist\async.js:1034:13)
at E:\js-report\node_modules\jsreport-fs-store\node_modules\async\dist\async.js:944:16
at E:\js-report\node_modules\jsreport-fs-store\lib\persistence.js:394:9
at E:\js-report\node_modules\jsreport-fs-store\lib\persistence.js:344:9
at E:\js-report\node_modules\jsreport-fs-store\node_modules\async\dist\async.js:460:16
at iteratorCallback (E:\js-report\node_modules\jsreport-fs-store\node_modules\async\dist\async.js:1034:13)
at E:\js-report\node_modules\jsreport-fs-store\node_modules\async\dist\async.js:944:16
at E:\js-report\node_modules\jsreport-fs-store\lib\persistence.js:341:11
at E:\js-report\node_modules\graceful-fs\graceful-fs.js:90:16
at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:446:3) -
How to pass Total sum of dynamic row into userdefined function?
Hi, Is there any way to call user defined function from handlebars file in this way:
r="I{{#sum data.length 30}}{{/sum}}" s="44" t="str"><f>{{#getAveragePercentage SUM(N29:N{{#sum data.hpmpsFutureFleetData.length 29}}{{/sum}})}}{{/getAveragePercentage}}</f></c>
where getAveragePercentage is user defined function that is defined in helpers.js. Now, I want to calculate Total sum of dynamic rows and then I want to pass the result in my user defined function(getAveragePercentage). I wrote above syntax but it's giving me error. So please let me know what will be the correct syntax to write the above code?