Jump to content

anatoly.weinstein

Members
  • Posts

    2
  • Joined

  • Last visited

 Content Type 

Forum

Downloads

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Security Advisories

Events

Profiles

Everything posted by anatoly.weinstein

  1. Actually, I have found an answer to my question here: jsonql datasource reference This page has a good comparison for syntax and capability of JSON and JSONQL. In question (with language="json") the proper field definition will looks like this: <field name="KeyTwoValue" class="java.lang.String"> <property name="net.sf.jasperreports.json.field.expression" value="proposalFees.nodes(type == KEY_2).value[0]"/> </field>[/code]
  2. I am new to Jasper and I am trying to do something like in the snippet below to get "value" of the "node" from the "proposal.proposalFees.nodes" array with "node.type" equal "KEY_2". Obviously, the below snippet doesn't work. Question: how to do it properly? The goal is that "$F{KeyTwoValue}" value displays "56000" in expressions (see sample data below). Any input would be greatly appreciated. <queryString language="json"> <![CDATA[proposal]]> </queryString> <field name="KeyTwoValue" class="java.lang.String"> <property name="net.sf.jasperreports.json.field.expression"> <![CDATA[proposalFees.nodes[type == "KEY_2"].value]]> </property> </field>[/code]Input source: { "proposal": { "proposalFees": { "nodes": [ { "value": 20000, "type": "KEY_1" }, { "value": 56000, "type": "KEY_2" } ] } }}[/code]
×
×
  • Create New...