adrian_32 Posted September 10, 2019 Share Posted September 10, 2019 I use the WebService Query to call an API script as datasource.The datasource is a JSON.To be able to filter on TransportProperties: CTRTYPE I use $F{PropertyCode}.equalsIgnoreCase("CTRTYPE") as Filter ExpressionI get "20 DV" as result.{ "Reference": "T03641955", "PublicId": "ZIMU-135721-8", "TransportProperties": [ { "PropertyCode": "CUSTDOC", "PropertyDescription": "Customs Doc", "Value": null, "DisplayValue": null, "Id": 5197 }, { "PropertyCode": "DG", "PropertyDescription": "Dangerous Goods", "Value": null, "DisplayValue": null, "Id": 5198 }, { "PropertyCode": "CTRTYPE", "PropertyDescription": "Container Type", "Value": "20 DV", "DisplayValue": "20 DV", "Id": 5202 } ], "Id": 1065}[/code]This is working great, but when I want to do something similar for ExtraQuantities, I don't get the desired result$F{Good.ExtraQuantities.UnitId}.equalsIgnoreCase("2")[ { "OrderItemId": 275, "Good": { "StockInfoConfig": { "ProductId": 408, "OwnerId": 5, "LocationId": 2875, "ExtraQuantities": [ { "Quantity": 1000.00, "UnitId": 2, "MeasurementUnitId": 1, "Id": 61308 }, { "Quantity": 1092.00, "UnitId": 3, "MeasurementUnitId": 1, "Id": 61309 } ], "Id": 15327 }, "Id": 15327 }][/code] Link to comment Share on other sites More sharing options...
swood_1 Posted September 12, 2019 Share Posted September 12, 2019 Have a look at JSONQL expressions.http://jasperreports.sourceforge.net/sample.reference/jsonqldatasource/index.html#jsonqldatasource Link to comment Share on other sites More sharing options...
CarrieKReed Posted December 28, 2019 Share Posted December 28, 2019 The order of items in the result of the filter expression is the same as the order in which those items appeared in the primary expression. 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