Page 1 of 1

Count fuction

Posted: Thu Jan 12, 2012 6:06 am
by Kennedy
I have one field DeductionAbsent, value is boolean type.
I want to generate one monthy attendance report per day.
My requirement is

let the report i like this

Date Absent
1/1/2011 y
1/2/2011 N
1/3/2011 Y

in the group footer , iwnt to get the total number of absent days ,means 2.


i tiried to create a formula like this,
IFF(DeductionAbsent=='Y' ? Count(DeductionAbsent))
But it is not working.
It is urgent for me,Please help me to achieve this.







Count fuction

Posted: Thu Jan 12, 2012 8:35 am
by joro
Hello!

If your datatype is boolean and we assume that true == 1 and false == 0 then you could just sum up the different boolean values to get the total number of absent days.
Have you tried that?
joro

Count fuction

Posted: Thu Jan 12, 2012 9:30 am
by Kennedy

I tried using the following formula
{(AttendLog.DeductionAbsent == 1 ? Count(AttendLog.DeductionAbsent)};

But i am getting the following error
"Reports.Report doesnot contain a defintion of AttendLog_DeductionAbsent."

Can u please tell me what does it mean.Being newbie to stimulsoft ,it is very difficult to do formulas .

Count fuction

Posted: Thu Jan 12, 2012 10:37 am
by joro
Hello!

Drag a Text-Field to your GroupFooter.

1. Click the text field with the right mousebutton and choose "Design".
2. Click Summary
3. Choose Summary Function -> Sum
4. Data Band -> DataBand1 (or whatever the name of your databand is)
5. Data Column: Choose "DeductionAbsent" from the DropDown
6. Click OK and your sum will appear.

Keep in mind, every group footer needs a corresponding group header! Otherwise the sum-function won't work


Count fuction

Posted: Fri Jan 13, 2012 3:24 am
by HighAley
Hello.

Or you should just use next expression

Code: Select all

{Sum(DataBand1,AttendLog.DeductionAbsent)}
Thank you.

Count fuction

Posted: Sun Jan 15, 2012 1:25 am
by Kennedy
That is fine. But my requirement is to get count of days only with AttendLog.DeductionAbsent is true.

Count fuction

Posted: Sun Jan 15, 2012 8:17 am
by Kennedy
Thank you joro and Aleksey.It is working perfectly fine...

Count fuction

Posted: Mon Jan 16, 2012 6:24 am
by Andrew
Hello,

Great! Have a good week!

Thank you.