Thx!

SigTill
@SigTill
Posts made by SigTill
-
RE: Generate new mail or *.msg or *.eml file
I want to call jsreport and get back a *.eml or *.msg so I can open it in my e-mail software and end the e-mail. So basically using jsreport as an "e-mail templater".
-
Generate new mail or *.msg or *.eml file
After I generate a report or file I usually want to send this file including a custom e-mail text (based on a template) and including an image.
Pretty similar to clicking a <a href="mailto:xxx@xxx.com;subject=kdsjf;body=hugebodywithimages>Send e-mail</a>
However what I want to do is add a lot of styled text/html in the "body" part and also images and attachements. Would it be possible to either create a template creating this in a good way. Or a template creating a *.msg or *.eml file that can be opened in the local E-mail software and forwarded to the correct receipt?
I could have had the "e-mail server" send an e-mail but I want that to be different "end users".
Thank you for the feedback.
-
RE: Restart server
The windows event viewer shows:
"Failed to start service jsreport-server. Program node couldn't be launched. CreateProcess() failed: Not enough memory resources are available to process this command."And some other processes running on that computer is takeing 100% of memory so that seems correct. Might have to add a delay on the retries. For instance try to restart the service every x minutes for the next x hours.
-
RE: Restart server
The files in C:\Program Files\jsreportapp\logs
error and reporter does not give any meaningfull errors.When I try to go to http://jsreport:5488/ it just says unavailable - also localhost:5488 on the server. I can ship you the error-files.
I sent you an e-mail with the logfiles for debug.
-
RE: Restart server
Due to other services on the same server using almost 100% CPU and RAM for some periods I assume it just does not have enough resources when needed. Will see if I can find some log files. Thx.
-
Restart server
Sometimes jsreport crashes. How can I restart the server automatically when this happens? For instance restart server every hour?
-
RE: Template not listed
It seems I forgot the subdomain - just used the www - sorry for that! When I tried a wrong username - it gave the wrong password/username message. Might be an improvement to pick up the erroneous subdomain. Thanks!
-
Template not listed
When doing:
https://www.jsreportonline.net/odata/templates?$select=name
I do not see my created template within the GUI on web (its a docx-template and runs nicely within the GUI - but want to send new data through the REST-API to generate more reports)
It only returns:
{"@odata.context":"https://www.jsreportonline.net/odata/$metadata#templates(name)","value":[{"_id":"54e68bf377c2cff00d525123","name":"Sample report"}]}
When I try to call the https://www.jsreportonline.net/api/report with the proper template name (by inspecting the call in chrome) I get the following response, only with the "sample" template.
{"message":"Unable to find specified template or user doesnt have permissions to read it: 5e3d276050ad90e4283fc4d4","stack":"Error: Unable to find specified template or user doesnt have permissions to read it: 5e3d276050ad90e4283fc4d4\n at module.exports (/usr/src/app/node_modules/jsreport-core/lib/util/createError.js:11:13)\n at Reporter.createError (/usr/src/app/node_modules/jsreport-core/lib/reporter.js:299:12)\n at AsyncFunction.<anonymous> (/usr/src/app/node_modules/jsreport-templates/lib/templates.js:134:20)\n at <anonymous>"}
-
docx - Image
I have managed to add an image in word using the following from https://jsreport.net/learn/docx
{{docxImage src=this}}
The images are
- approx 300x300 pixels large
- PNG, 500kb - 1MB in size.
- I save them as Base64 image/png types in a json.
When I add one image just by drag-drop into word its fast to "edit" (ie left-click on the image and resize it).
When I open the word-file generated with jsreportonline it takes 5-10 seconds to get the "edit image size" and Word seems to "freeze". File size of the generated word file is approx 5MB and this contains approx 18 images.Is there another more optimized image format for json+word? or a better approach to do this?