How to intergrate group data into ONE chart ?

First, congratulations on the new home of JasperReports & iReport & JasperIntelligence !

(This question is original posted at

Suppose the following data set:

TimeInterval   Direction    Count
00:00-00:30    DialIn       100
00:00-00:30    DialOut      101
00:30-01:00    DialIn       102
00:30-01:00    DialOut      103
01:00-01:30    DialIn       104
01:00-01:30    DialOut      105

I want the following result/goal:

TimeInterval   DialIn_Count DialOut_Count
00:00-00:30    100          101
00:30-01:00    102          103
01:00-01:30    104          105

A chart contains two series: 1st is DialIn_Count series, 2nd is DialOut_Count series.

Before I use crosstab, I can use report group to group out DialIn and DialOut separately, and each group contains a chart which contains 1 series. So, none of them meet my requirements.

After I used crosstab, I achieved the first result/goal, but I still can't get 2 series in ONE chart, so, is there a way to achieve it ?

Thanks !

lovetide's picture
Joined: Jul 17 2006 - 11:19pm
Last seen: 10 years 1 month ago

1 Answer:

Hi liu,

attached there is the solution to your problem
solved using a chart (absolutly unuseful) and
a crosstab (that is what I think you need).

Attached there is a CSV file to test the jrxml
using a CSV datasource.

Please note that the crosstab is at the end of the report.

Giulio [file size=16740]

giulio's picture
Joined: Jan 2 2007 - 4:15pm
Last seen: 5 days 15 hours ago