What should i put on the template that will load the data, the sample url ('http://localhost:3000/users') gets data from a table , with the columns , name, email, how do i get the data to be fetched on the script and displayed on the template with js report,
Fred Shija
@Fred Shija
0
Reputation
4
Posts
367
Profile views
0
Followers
0
Following
Posts made by Fred Shija
-
RE: embed jsreport on angular, node js application
-
RE: embed jsreport on angular, node js application
Hello jan blaha , this is where am not sure what to do.
//load some data from the remote API const axios = require('axios') async function beforeRender(req, res) { const r = await axios.get('http://localhost:3000/users') req.data = { ...req.data, ...r.data} } //send the pdf report by mail //send the pdf report by mail const nodemailer = require('nodemailer') async function afterRender(req, res) { //const smtpTransport = nodemailer.createTransport({...}) const mail = { from: '..>', to: '...', subject: '...', text: '...', attachments: [ { filename: 'Report.pdf', content: new Buffer(res.content) }], } try { await smtpTransport.sendMail(mail) } finally { smtpTransport.close() } }
-
RE: embed jsreport on angular, node js application
My problem is , am not sure how to create a template then point it with a script to fetch data from, do you have a working sample , a template with a script that fetches data from postgres that i can refer to
-
embed jsreport on angular, node js application
Hello, I am new with jsreports studio, currently working on a project with angular and node js, i need to be able to fetch records from a database with jsreport designer, then embed it with angular applications , i've tried to follow the jsreport introduction but i cant get it right or the information is not enough.