Jump to content

How to use field expression in field mapping itself?


Recommended Posts

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"]}[/code]

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?

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...