Hi all
I created a bar chart in report designer from pentaho with a data source which counts two different values (open and closed tickets) per month over the last 12 monts (see details below).
In the bar chart properties I have selected:
- category-column: month
- value columns: open tickets, closed tickets
When running the report, the legend only shows me "Series 1" and "Series 2"
Does anybody know why it shows that and not "open" and "close" as the column headline in the sql?
Thanks a lot for any kind of tips.
Best regards
Michael
SELECT
MONTHNAME(ticket.create_time) as 'MONTH_'
, count(t1.id) as 'open'
, (SELECT count(t2.id) FROM ticket t2
INNER JOIN ticket_history th ON th.ticket_id = t2.id
INNER JOIN ticket_history_type tht ON th.history_type_id = tht.id
WHERE tht.name = 'StateUpdate'
AND th.name LIKE '\%\%%\%\%closed%'
AND MONTHNAME(th.create_time) = MONTHNAME(ticket.create_time)
AND t2.queue_id NOT IN (3,4) /*nicht in Junk und System Message*/
AND th.create_time >= th.create_time - INTERVAL 12 MONTH
) as 'close'
FROM ticket
JOIN ticket t1 ON ticket.id = t1.id
WHERE
ticket.queue_id NOT IN (3,4) /*nicht in Junk und System Message*/
AND ticket.create_time >= ticket.create_time - INTERVAL 12 MONTH
GROUP BY MONTH_
ORDER BY ticket.create_time DESC