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

ankit.maurya

Members
  • Posts

    2
  • Joined

  • Last visited

ankit.maurya's Achievements

Newbie

Newbie (1/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. Because here in some cases we have multiple values in json_col and that is not fixed, some json_col has one key and value whereas some have more than one. So the actual case is that there will be a new column for each new value. name1, name2, name3 and so on.
  2. The problem is as described below: I have a SQL(Postgresql) table as given below and I am using spring-hibernate to use it as my data source for the report. Col 1Json Col-1{"Id": 5, "name": "MNP"}0{"Id": 6, "name": "Abc", "Id": 12, "name": "JKL"} -1{"Id": 7, "name": "Def"} I have to make a table in the report with the same data but in below-given way: Col 1MNPABCDefJklJson Col-1MNP {"Id": 5, "name": "MNP"}0 Abc Jkl{"Id": 6, "name": "Abc","Id": 12, "name": "Jkl"}-1 Def {"Id": 7, "name": "Def"}for this, there are two fields for the table as col_1 and json_col and everything works fine and the report gets generated when it is just this. But when I add a third field "MNP" <field name="MNP" class="java.lang.String"> <property name="net.sf.jasperreports.jsonql.field.expression" value="name"/> </field> and other fields as in table Using the json query below <queryString language="jsonql"> <![CDATA[$F{json_col}]]> </queryString> Both the previous column still displays data but the new columns are blank. Any help is really appreciated.
×
×
  • Create New...