Totals in group footer only if databand has more than one row

Stimulsoft Reports.NET discussion
Post Reply
User avatar
Fabio Pagano
Posts: 355
Joined: Mon Apr 16, 2007 12:38 pm
Location: Bari (Italy)

Totals in group footer only if databand has more than one row

Post by Fabio Pagano »

I have a databand and a group header and a group footer. In the group footer i have put some totals. If the group is formed by only one row i don't want to make appear the group total (because it would be the same amount of the single row printed).

Any suggestion?

Thanks.
Brendan
Posts: 309
Joined: Sun Jul 16, 2006 12:42 pm
Location: Ireland

Totals in group footer only if databand has more than one row

Post by Brendan »

Maybe something like the following behind the "BeforePrintEvent" of the Group Footer band

Code: Select all

GroupFooter1.Enabled = (Totals.Count(GroupHeader1) > 1)
where GroupHeader1 is the band that groups your data.
and GroupFooter1 is the component to hide. This could be your text component displaying the total sum. In this case the entire footer band won't be printed to the output
Post Reply