Jump to content
Changes to the Jaspersoft community edition download ×

count and average (avg) in group footer


2004 IR Help

Recommended Posts

By: subsphoto - sunsphoto

count and average (avg) in group footer

2004-12-29 02:09

Dear all

 

I have the following problem!

 

Detail records

amt

A 10

A 20

B 40

B 20

 

group 1

v${gp1_amt}

A 30

B 60

 

group 2

v${gp2_amt} v${gp2_avg_amt}

6 30

 

In group 1 band

I create a variable V${gp1_amt} in group 1 footer which is sum() on field "amt" in detail band. It is correct and give 30 for "A" and then 60 for "B"

 

In the group 2 band

I want to count number of total in group in 1.

I create a variable V${gp2_amt} in group 2 footer.

The variable is count() on group 1 variable V${gp1_amt}

I expect to get 2 in V${gp2_amt} but I get 6

 

I also want to get the average total amt in group 1.

I thus create a variable V${gp2_avg_amt} in group 2 footer. The field is avg() on group 1 variable V${gp1_amt}.

I expect to get 45 in V${gp2_avg_amt} but I get 30

 

Can anyone help?

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