How to send parameters through querystring from client to jsreport template so that in 'beforeRender' we can get the querystring and use as parameter for API call or for any DB query.
J
Posts made by jagadeesh-vj
-
How to send querystring from client and get it in jsreport template ?posted in general forum
-
RE: Is it possible to Fetch data from mysql ?posted in general forum
Thanks for your quick reply as always. That worked well.
mqsql installation;
npm install mysqlcode:
var mysql = require('mysql'); var con = mysql.createConnection({ host: "server-name", user: "user-name", password: "password", database: "sample", port: "3306", }); function beforeRender(request, response, done) { con.connect(function(err) { if (err) throw err; con.query('select name,value from tblparameter', function(err, result, fields) { if (err) throw err; request.data = { config: result }; done(); }); }); } -
Is it possible to Fetch data from mysql ?posted in general forum
I understand the jsreport supports mssql, mongodb and postgreSQL for template stores, saving jsreport entities.
Is it possible to just fetch data from mysql database and display in report as pdf or html based on recipe selection ?
-
RE: jsreport as service in linux(To Run all time)posted in general forum
Thanks Jan for your quick reply. Perfect. Service is running.
-
jsreport as service in linux(To Run all time)posted in general forum
I am new to jsreport and exploring its features. How to run jsreport as service in linux server. The npm installation commands 'jsreport start' is working. But I would like to run it as a service so that jsreport is always running in linux box.