Jump to content
We've recently updated our Privacy Statement, available here ×

rogier_1

Members
  • Posts

    3
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by rogier_1

  1. You are absolutely right. Actually, this part is where I found the solution of the -1. I just missed the colon. Sorry about that and thanks a lot for your help!!
  2. That worked! Can you maybe tell me where I could have found this in the documentation? Maybe there are some more features I need to know of?
  3. Hello, I have a JSON datasource with an array of addresses. I need tp print the last element's street1 value. here's the json: "addresses": [ { "id": 19764, "addressType": { "name": "HOME", "i18nName": "address_type.HOME.NAME", "i18nDescription": "address_type.HOME.DESCRIPTION" }, "street1": "Lage Naarderweg", "houseNumber": 54, "houseNumberSuffix": "", "postalCode": "1211ac", "city": "Hilversum", "country": { "id": "NL", "countryCode3": "NLD", "name": "Netherlands", "countryCallingCode": 31 } }, { "id": 19765, "addressType": { "name": "HOME", "i18nName": "address_type.HOME.NAME", "i18nDescription": "address_type.HOME.DESCRIPTION" }, "street1": "Hoge Naarderweg", "houseNumber": 54, "houseNumberSuffix": "", "postalCode": "1211ac", "city": "Hilversum", "country": { "id": "NL", "countryCode3": "NLD", "name": "Netherlands", "countryCallingCode": 31 } } ], In my field I use this syntax: <field name="street1a" class="java.lang.String"> <property name="net.sf.jasperreports.jsonql.field.expression" value="person.addresses.*[-1].street1"/></field> If I replace -1 with 0, I get the first element's street1 value: Lage Naarderweg, which is correct If I replace -1 with 1, I get the 2nd (= last) element's street1 value: Hoge Naarderweg, which is correct But -1 gives me null. According to this doc: http://jasperreports.sourceforge.net/sample.reference/jsonqldatasource/index.html, this syntax should work. Anyone any ideas? Rogier
×
×
  • Create New...