How to use a json data file in iReport Designer 5.6.0
Sophia Terry
I had just downloaded iReport 5.6.0. But unable to load any JSON file parameters on top of the report.
I didn't find any good help online related with this. I find some help from the url as below:-
But from the above steps I didn't know where to write query in "report query" and to manually create fields, matching names of our json data.
Please help to load data from JSON datasource.
11 Answer
A little bit late, but here are directtions.
1) Click Report Datasource button in iReport Designer:
2) Click "New", select "JSON datasource, click "Next"
3) Give it Name, browse to a json file, click "Test" to check:
json.txt:
[
{ "id": 123, "name": "abc" },
{ "id": 456, "name": "def" }
]4) Add fields manually, use proper types and put onto the report page:
5) Generate preview:
1