Average in Group Footer

Stimulsoft Reports.NET discussion
Post Reply
MikeC
Posts: 51
Joined: Mon Jun 07, 2010 3:36 pm

Average in Group Footer

Post by MikeC »

I have a report that has 2 group headers/footers (tax district and then parcel type).

For some parcel types (not all) the value is measured in units rather than a land, dwelling or building value sum.

For the average number of units in the parcel type footer I'm using {Functions.Divide(Sum(DataBand1,Parcel.[Number Of Units]),Count(DataBand1,Parcel.[Number Of Units]))} which works for the parcel group.

I'd like the same total to show up in the tax district footer, but the tax district group includes records where the count is zero (not relevant).

How do I create an expression in the tax district footer that will average the grain units, but not include the zeros from other parcel types?
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Average in Group Footer

Post by Alex K. »

Hello,

Please instead of expression:

Code: Select all

{Functions.Divide(Sum(DataBand1,Parcel.[Number Of Units]),Count(DataBand1,Parcel.[Number Of Units]))}
use the following expression:

Code: Select all

{IIF(Count(DataBand1,Parcel.[Number Of Units]) != 0 , Functions.Divide(Sum(DataBand1,Parcel.[Number Of Units]),Count(DataBand1,Parcel.[Number Of Units])), 0))}
Thank you.
Post Reply