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
jagadeesh-vj
@jagadeesh-vj
0
Reputation
5
Posts
1011
Profile views
0
Followers
0
Following
Posts made by jagadeesh-vj
-
How to send querystring from client and get it in jsreport template ?
-
RE: Is it possible to Fetch data from mysql ?
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 ?
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)
Thanks Jan for your quick reply. Perfect. Service is running.
-
jsreport as service in linux(To Run all time)
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.