How to use field expression in field mapping itself?

I am using REST as the datasource in my JasperReports Server instance. The response from REST endpoint is like follows :

  "field1" : "value1",
  "field2" : "value2",
   "field20" : "value20",
   "fieldsToReport" ": ["field2", "field7", "field13", "field18"]

Now I want to generate a dynamic report with two columns "Field name" and "Field value". How many rows land into the report depends on "fieldToReport" field. So for example for the above data, the report will only show 4 rows i.e. field2, field7, field13 and field18 .

One of the way to do this is get the field name from "fieldToReport" and use that field name in the field mapping expression. But as I was trying it I realized that field mapping expression does not evaluate $F expression. Now I am not sure whether I am writing incorrect expresison or there is some other better way to solve this?

siddharth.goel's picture
Joined: May 8 2016 - 11:43pm
Last seen: 3 years 8 months ago

0 Answers:

No answers yet