Jump to content

use subreportparameter with json string in crosstab


jaapandre

Recommended Posts

I have a subreport with a crosstab. Each row shows the average on a topic. I want to color the background of the cells based on the average of al scores (low average: red, high average: green, in between: yellow) The range of the scores can vary (so on one topic 3 is good, on another it is bad)

At this moment I have a subreport parameter containing a json string to determin the range of the score per topic (eg: (topic1:scale5, topic2: scale6, topic3: scale3))

I have another subreport parameter which contains a hashmap with per range of the scores (eg scale5) the bottom-value, the top-value and each color

How can I get the range of a specific topic?

I tried a scriplet, but they don't work in a crosstab

I tried to use: org.json.simple.JSONValue.parse($P{SCALE_QUESTION_INFO}").get($F{topic}), but that gives a error the method get{String) is undefined for the type Object

Any help would be appreciated.

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

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