Column to be added between dynamic columns from crosstab


I am having one requirement to show count of tickets on column category and row priority in crosstab. I have achieved the same by using crosstab but now our requirement to add veriable column at the end of dynamic every category available in Column of crosstab to calculate the percentage of this category count. 

Priority Network network % Software software % Total
High 2 40 3 60 5
Medium 5 50 5 50 10
Low 10 71 4 28 14

I am not able to add extra column like network% or software%, Please guide me to create such type of report.


Thanks in advance:-)

mayur.malhotra's picture
Joined: Jun 6 2017 - 7:51am
Last seen: 1 year 9 months ago

I have used query till now. select Priroity, category, count(id) from ticketdata and added Priority in cross tab rows and Category in Column Tab and count(id) in between count data. But Now I want to add extra column in between each category which is coming from Column of cross tab. this field is not available in Database but I want to create variable which data something like if first category count for first priority is less than 10 then it will show 2 other wise 1. I know how to use conditions in jasper but which field I have to use and how it will drag it to besides each column of crosstab that need to know.


mayur.malhotra - 4 years 9 months ago

1 Answer:

If you want to put this columns at the same level at rest of columns you must give as a query columns to crosstab.

I recomend to create this % columns in SQL Query and use them with crosstab.


mlopez_1's picture
Joined: Oct 21 2013 - 8:08am
Last seen: 15 hours 23 min ago