# node-json-jasper

> A node module to generate jasper reports using JasperStarter

Latest version **1.0.2** (published 2023-10-27) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install node-json-jasper
pnpm add node-json-jasper
yarn add node-json-jasper
bun add node-json-jasper
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; large bundle.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2023-10-27 |
| First published | 2023-10-27 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 77.9 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Luiz Mello |
| Maintainers | loezbr |
| Keywords | jasper, report, JasperReports, reports, JasperStarter, pdf, docx, xlsx |

## Links

- npm: https://www.npmjs.com/package/node-json-jasper
- Repository: https://github.com/loez/node-json-jasper
- Homepage: https://github.com/loez/node-json-jasper#readme
- Issues: https://github.com/loez/node-json-jasper/issues
- npm.io page: https://npm.io/package/node-json-jasper

## Alternatives

- [@cantoo/pdf-lib](https://npm.io/package/@cantoo/pdf-lib.md) — 297.9K weekly downloads
- [datatables.net-buttons](https://npm.io/package/datatables.net-buttons.md) — 200.1K weekly downloads
- [@ckeditor/ckeditor5-export-pdf](https://npm.io/package/@ckeditor/ckeditor5-export-pdf.md) — 167.0K weekly downloads
- [scanbot-web-sdk](https://npm.io/package/scanbot-web-sdk.md) — 15.0K weekly downloads
- [@syncfusion/ej2-angular-pdfviewer](https://npm.io/package/@syncfusion/ej2-angular-pdfviewer.md) — 8.8K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2023-10-27
- 1.0.1 — 2023-10-27
- 1.0.0 — 2023-10-27

## README

# node-json-jasper
A simple node library to generate Jasper Reports using JasperStarter with json files.

------------

### Required
NodeJS Version 16.x.x or greater
Java 8 installed

------------
### Usage
`npm install node-json-jasper`
```javascript
    const {generateReport} = require("node-json-jasper")

let report = generateReport(reportName ,jasperReport ,reportOutput, jsonPath, {exportType:"pdf",bufferRetrun:true})
```
### generateReport (options,{Optional Parameters})
| Options  | Information  |
| ------------ | ------------ |
|  reportName | (string) Name that will be saved the report on output folder  |
| jasperReport  | (string) The full path to the .jrxml or .jasper file  |
| reportOutput  | (string) The full path were the report will be generated  |
| jsonPath | (string) The full path to the json file that will be used to fill the report|

| Optional Parameters | Information |
|---------------------| ------------ |
| exportType          | (string) The type of the exported file ("pdf", "docx", "xlsx", "pptx", "rtf", "html", "xhtml", "xml")  |
| jsonQuery           | (string) The key that will be used on the json to filter on report |
| parameters          |(object) A Simple object with key-value to used as Parameter on the jasper report  |
| bufferReturn        | (bool) When true the file saved on output folder will be opened return the buffer of file and delete|

------------


## Thanks
Created based on [Lavela](https://github.com/lavela/phpjasper/ "Lavela") php solution
Thanks [Raphael](https://github.com/raphael-heilbuth "Raphael") for always helping with this things

------------



## Upcoming Features
Option to pass JSON Object to generate the report

------------


## Me
[Luiz Mello](https://github.com/loez/ "Luiz Mello")

---
_Source: https://npm.io/package/node-json-jasper · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
