Jump to content
Changes to the Jaspersoft community edition download ×

json(ql) datasets and charts


fizz112

Recommended Posts

I haven't seen any explanations on how to format json data into groups to power charts in Jasper and I am struggling to work out how to do it.

I have json data with one field, "gender" and it is a string with two values M or F. I need to be able to group the data and then produce a pie chart to show the proportions of M and F.

The two options I thought might be solutions would be:

  1. Create groups using jsonql in the Dataset and Query dialog.
  2. Create a group in the main report and create a "count" field in the footer to tally it up and then use this in the chart

However I cannot find any way to do the above or if I am even on the right track. Does anyone know how to this? Thanks!

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

You can create groups in the report based on the report element (field, paramater) or expression. You don't need to use the query language for that. You can also create a sort field to sort the data before grouping. To do a totals count, you can create a variable with count calculation and reset type set on group you've created. In JSS to create a group right click on the root report object in the outline and press Create Group.

Link to comment
Share on other sites

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...