Jasper Node Client
A module providing a simple Jasper Server Client
Install
npm install jasper-node-client --save
Configuration
An object with the following structure is require (you can put it in your application config file):
jasperRestService: /** * Base Url of your JasperServer * @type */ baseUrl: '' /** * User Name * @type */ userName: '' /** * User passworj * @type */ password: '' /** * Request headers * @type */ headers: authorization: '' accept: 'application/json'
__
Example
'use strict' var config = baseUrl: '' userName: '' password: '' headers: authorization: '' accept: 'application/json' const Jasper = config var jasper = var reportPath = '' var reportName = 'ExampleName' var fileFormat = 'pdf' var params = fec_ini: '2016-11-01%2000:00:00' fec_fin: '2016-11-14%2000:00:00' telefono: '0414' conditions: '' auxiliarconditions: '' query: '' jasper;
A way to force the file download without page reloading (Asuming you got a webservice that uses jasper-node-client):