How can I show percentage of total on report?

Stimulsoft Reports.NET discussion
Post Reply
Sandy Pham
Posts: 62
Joined: Mon Dec 11, 2006 1:43 pm
Location: U.S.A.

How can I show percentage of total on report?

Post by Sandy Pham »

I have a report that displays Incident number and a "Closed on 1st Call" boolean value.

I would like to show a total at the bottom that looks something like this:

TOTAL COUNT: 147
Closed on 1st call: 65%
Not closed on 1st call: 35%

How can I do this?

I tried this, but I get syntax errors:

Closed on 1st call: {Div(Sum(IIF(Incident.Closed_on_1st_Call,1,0)),Count())*100}%
Not closed on 1st call: {Div(Sum(IIF(Incident.Closed_on_1st_Call,0,1)),Count())*100}%

If I replace Count() with a number (100) it works:

Closed on 1st call: {Div(Sum(IIF(Incident.Closed_on_1st_Call,1,0)),100)*100}%
Not closed on 1st call: {Div(Sum(IIF(Incident.Closed_on_1st_Call,0,1)),100)*100}%

Thanks!
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

How can I show percentage of total on report?

Post by Vital »

Hello Sandy,

Please try following expression:

Code: Select all

{Div(Totals.Sum(DataBand1, IIF(Incident.Closed_on_1st_Call,1,0)),Totals.Count(DataBand1))*100}%
Or you can one of latest prerelease build which contain fix for this problem.

Thank you.
Post Reply