Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

datasource type json #3

Open
solinad21 opened this issue Sep 9, 2021 · 0 comments
Open

datasource type json #3

solinad21 opened this issue Sep 9, 2021 · 0 comments

Comments

@solinad21
Copy link

solinad21 commented Sep 9, 2021

need json datasource and i have changed you index.js with this:

if (connections) {
    if (connections.driver === 'json') {
        this.command += ' -t ' + connections.driver
        this.command += ' --json-query ' + connections.jsonquery
        this.command += ' --data-file ' + connections.datafile
    } else {
        this.command += ' -t ' + connections.driver
        this.command += ' -H ' + connections.host
        this.command += ' -n ' + connections.database
        this.command += ' -u ' + connections.username

        // optional parameters
        if (connections.hasOwnProperty('password')) this.command += ' -p ' + connections.password
        if (connections.hasOwnProperty('port')) this.command += ' --db-port ' + connections.port
        if (connections.hasOwnProperty('sid')) this.command += ' --db-sid ' + connections.sid
    }
}

in my tests work ok,

json-jrxml.zip

and test with this json:
https://github.com/TIBCOSoftware/jasperreports/blob/master/jasperreports/demo/samples/jsondatasource/data/northwind.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant