Jump to content
We've recently updated our Privacy Statement, available here ×

Multi Axis Reports in iReports (series expression)


clshafer

Recommended Posts

I am having difficulty with Multi Axis Line/Bar chart in iREPORTS.   I might be that I am not sure on how the Data Detail Series Expression works.  I am using a simple MySQL query pulling three distinct values("NumOfPrograms", "AvgCostperProgram", "AvgAttendees"),  in the first column called Cat1.  When I use the first column name "Cat1" for the Series Expression, I am able to create a line chart with 3 lines.  Everything is Great.  But, when I try to do like the example for multi-axis chart and add three individual Data Detail Series Expressions, one for each of the unique values in Cat1 I only get one series.

The three Data Detail

Series Expression= "NumOfPrograms"  , Category expression = $F(prog_type), Value expression = $F(amount)

Series Expression="AvgCostperProgram", Category expression= $F(prog_type), Value expression = $F(amount)

Series Expression="AvgInvitees", Category expression= $F(prog_type), Value expression = $F(amount)

The three columns from MySQL : (Cat1, prog_type, amount).   

It has just occurred to me I am not sure when/where I tell the Mult-axis chart which field to find the 3 distinct values ???  Could this be where I am missing something?

 

Link to comment
Share on other sites

  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

That link is THE example I have been using as a reference. When I put in the three separate Series expressions; "NumOfPrograms", "AvgCostperProgram", "AvgAttendees", which are the values in the column Cat1, I only get on one line instead of three, but the legend has the three entries. I do not specify anywhere to look at field cat1 it is just the first column is the query. Is there a place to put cat1 as the field to use and still specify the three values in three separate series expression.
Link to comment
Share on other sites

Query Results:

 

Cat1 program_type amount

--------- ------------ ----------

Cost Breakfast 2347.504472

Cost Dinner 3360.645796

Cost Lunch 2513.695121

Invitees Breakfast 17.200000

Invitees Dinner 44.555762

Invitees Lunch 19.217391

Programs Breakfast 123.000000

Programs Dinner 1444.000000

Programs Lunch 580.000000

 

When a generate a line chart within Multiple Chart for this data set it looks great, I get three lines that represent the, but only if I specify $F(cat1) as the series expression. When I change the series expression to "Costs", I actually get a single line that has "Invitees" data, odd!!! If I specify the three series expressions individually (costs, Programs, Invitees) I get three lines all using INVITEES data, looking like single line.

 

 

Link to comment
Share on other sites

cat1 program_type amount

-------- -------------- --------

Cost Breakfast 2347.504472

Cost Dinner 3360.645796

Cost Lunch 2513.695121

Invitees Breakfast 17.200000

Invitees Dinner 44.555762

Invitees Lunch 19.217391

Programs Breakfast 123.000000

Programs Dinner 1444.000000

Programs Lunch 580.000000

Link to comment
Share on other sites

Is there a way to add a picture to show you the layout. It is a three column layout.(Cat1, program_type, amount). When I try to show the data is gets bunched up. When I generate a line chart within Multiple Chart for this data set it looks great, I get three lines that represent the three series, but only if I specify $F(cat1) as the series expression. When I change the series expression to "Costs", I actually get a single line that has "Invitees" data, odd!!! If I specify the three series expressions individually (costs, Programs, Invitees) I get three lines all using INVITEES data, looking like single line.
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...