shavaughn70 Posted September 26, 2019 Share Posted September 26, 2019 Hi everyone,I need to retrieve values from JSON datasource without an index/key.Examples:"items": [ "items 1", "items 2", "items 3", "items 4", "items 5"][/code]How can I retrieve all values from items?I have tried:items.* (only return first element)items.[n] (only return [n] index element)items.[x:y] (only return [x] index element)And yes, I have read JSONQL docs http://jasperreports.sourceforge.net/sample.reference/jsonqldatasource/index.htmlThanks! Link to comment Share on other sites More sharing options...
narcism Posted September 26, 2019 Share Posted September 26, 2019 What does your JRXML look like? Link to comment Share on other sites More sharing options...
d-nibaev Posted May 26, 2021 Share Posted May 26, 2021 You can pass array as DataSource to a table (for example) like((net.sf.jasperreports.engine.data.JsonQLDataSource)$P{REPORT_DATA_SOURCE}).subDataSource("items")And then use array element for Text Field like $F{node} Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now