Display error when chart and table in same detail from JSON Datasource

0

Hi there,

I have a JSON format like this one.

[{
    "table": {
        "id": "1",
        "name": "joe",
        "tax": "255332523",
        "fax": "2424474745",
        "phone": "0932467893"
    },
    "chart": [{
            "category": "a",
            "value": "1"
        },
        {
            "category": "b",
            "value": "1"
        }
    ]
}, {
    "table": {
        "id": "2",
        "name": "jane",
        "tax": "363626236",
        "fax": "35476346",
        "phone": "34534734734"
    },
    "chart": [{
            "category": "a",
            "value": "2"
        },
        {
            "category": "b",
            "value": "2"
        }
    ]
}, {
    "table": {
        "id": "3",
        "name": "james",
        "tax": "255332523",
        "fax": "2424474745",
        "phone": "346346346"
    },
    "chart": [{
            "category": "a",
            "value": "3"
        },
        {
            "category": "b",
            "value": "3"
        }
    ]
}]

And I want it display as page by page , and chart and table in same page.

But it has some error , table displays normal , but chart always display last data from array.

Table and Chart dataset using JRDatasource => ((net.sf.jasperreports.engine.data.JsonDataSource)$P{REPORT_DATA_SOURCE}).subDataSource("table/chart") .

Where I do wrong ? Please help :(

Thanks .

sciuridae0603's picture
Joined: Jun 21 2019 - 11:23pm
Last seen: 1 month 2 weeks ago

0 Answers:

No answers yet
Feedback
randomness