Super. Thank you. I have now done it similarly but with Promise.
I just had other errors in it and that's why I had such difficulties.
Posts made by Fredo70
-
RE: chart.js in an #each loop
-
chart.js in an #each loop
Hi
I need to create several diagrams by placing them in a loop.
I have looked at the example and there a trigger is fired when the animation is finished.
Would this also work if I disable the animations and do without the trigger? Apparently not, or I'm doing something wrong.
If I really have to work with the trigger, how do I do it with several diagrams in the loop? I don't have to trigger it until all the diagrams are done.
I still use version 2.10.0
Thank you. -
RE: xlsx template no longer works with 3.6.2 (working with 3.5.0)
Yes. The helper block modifies the $xlsxTemplate.
function outputComments(opts) { if (opts.data.root.$commentsRecords && opts.data.root.$commentsRecords.cells) { var vml = addCommentsShapes(opts.data.root.$commentsRecords.cells); opts.data.root.$xlsxTemplate["xl/drawings/vmlDrawing1.vml"] = vml; } }
-
xlsx template no longer works with 3.6.2 (working with 3.5.0)
Hi.
I have a rather complex Excel template (with comments) that worked with version 3.5.0 without any problem. With 3.6.2 it no longer works.
At the moment it is not clear to me where the problem lies. But it seems to be as a helper block, which is after a {{#each}} block, is executed before the each.
I see something was changed in 3.6.0 but I cannot make a relation to my problem.
Thank you -
Use lodash with Windows Single Executable
Hi. Is it possible to use lodash with the Windows Single Executable? If so, how?
The computer where jsReport is running has no access to the internet. I cannot install anything "online".
Thank you -
RE: recipe xlsx an comments
I've done it. It's a little bit complicated, though. So I'd be happy to explain it in detail here, but only if anyone's interested.
In a nutshell:
I simply generated the whole vml. This thread helped me: https://stackoverflow.com/questions/3494856/how-to-add-a-comment-to-a-cell-in-excel-2007-using-the-open-xml-sdk-2-0/20740684Then I had to feed the files
xl/comments1.xml
,xl/persons/person.xml
andxl/threadedComments/threadedComment1.xml
with appropriate data. -
recipe xlsx an comments
Hi
I am trying to insert comments in an Excel sheet.
I analysed a file and found that the comments are in two files:
xl/threadedComments/threadedComment1.xml
and
xl/comments1.xml
I can add the XML code and the files seems to be ok. But Excel wont show the comment. It removes it automatically inxl/comments1.xml
.
Further I found that a comment has an attributeshapeId
.<comment ref="A1" authorId="0" shapeId="0" xr:uid="{AD9B68F3-9264-4B43-BE6B-2456B4FCB508}"> ... </comment>
The
shapeId
references a shape in the filexl/drawings/vmlDrawing1.vml
. This file is not XML. So I cannot manipulate it with the helpers.
Or is there a way to manipulate this file?
Or am I doing something completely wrong and there is another possibility?
I'm afraid you say I have to program my own helper :-)Many thanks
-
RE: column width html-to-xlsx with chrome engine
Hi Jan
Ok. Thank you for your answer.
No problem. It can be reasonably expected to set the width in Excel with a double-click.
Best regards -
column width html-to-xlsx with chrome engine
Hi
I designed a html template with merged columns, merged rows, formatted cells, etc.
This template is rendered with html-to-xlsx and chrome engine.
The jsreport version ist 2.4.0
Well for a simple template the width of columns seems to be adjust automatically.
For my template it is not the case.
I reproduced a small sample in the playground: sample html-to-xlsxCan I make something the get the width adjusted?
Thank you -
Merge template to one pdf
Hi
I'm stuck trying to merge multiple PDFs from a template into one PDF.
The use case is, I have one template for single device data. So one pdf for one device.
A customer want to have one pdf for all devices. The structure of the data is the same, but in an array "devices".
So I would like to reuse the same template and I thought I could merge the pdf's with pdf-utils.
Here is a simplified example: https://playground.jsreport.net/w/Fredo70/7f4aA6IvThe problem is, the context passed to the "sub-template" is the whole context. But I would need the array element that is iterated.
The result should be really the single pdf's merges together. So the total page numbers in the footer should be 1/1 on every page. See template "desiredResult".Is this possible? Or do I have to change my approach? With "Partials" or something else?
Many thanks -
HighCharts Example
Hi
Do you have an actual Highcharts example working with chrome-pdf?
If I search or follow links to the playground it seems I don't have access.
Thank you -
RE: Control page break depending on the page number
oh dear!
Just have to usestyle="page-break-after: always;"
after the div.
It works. -
Control page break depending on the page number
Re: How to dynamically insert page break
Hi Jan
Ok, I understand your answer. I am looking for something similar.
In a handlebars template I have this:{{#each devices}} <div class="pageBreakBefore"> {{> device}} </div> {{/each}}
I would like to have "pageBreakBefore" not added on the first page.
Is this possible?
Thank you -
text recipe encoding
Re: Problem with text recipe encoding
Hi
we currently only support UTF8 encoding [...]
Do you have any plans to enable setting of encoding?
Thank you -
viewportSize PhantomJs
Are you planning on being able to set the viewportSize property of phantomjs?
viewportSize PhantomJs -
RE: Script Timeout
shame to me... sorry. I see now that I have to call done().
-
Script Timeout
Hi
I am new to jsReport and want to evaluate this product for the company I'm working.
Maybe I don't understand something. It should be elementary and simple.
At first I tried on my installation and than (thinking I made a mistake by the installation) in the playground. I get the same problem.- create a template (I had only a div with "hallo")
- create a script (just put a comment line... or something else)
- click run, the template is rendered
- assign the script to the template
- click run... get timeout
Error occured - Error during rendering report: Timeout Stak - Error: Timeout at Timeout._onTimeout (C:\jsreport\playground-service2\node_modules\script-manager\lib\manager-servers.js:137:23) at ontimeout (timers.js:471:11) at Timer.unrefdHandle (timers.js:584:5)
Playground
I don't understand why. The sample "Orders" has a script assigned and works. Why doesn't my simple sample work?