Page 1 of 1

Count not working in 2015.3

Posted: Thu Feb 25, 2016 11:07 pm
by jp2code
Work is not ready to upgrade to the new version yet, so for now we are still using 2015.3.

For Cash Sales, I count the number of items using

Code: Select all

{Count(DataBand1, Rpt_SalesRegisterDetails.AmountDue == 0 ? 1 : 0)}
For Charge Sales, I count the "non-cash" items

Code: Select all

{Count(DataBand1, Rpt_SalesRegisterDetails.AmountDue != 0 ? 1 : 0)}
Currently, all of our transactions are Cash Sales, so there should be 0 showing for Charge Sales.

Did I write the code correctly?
getgreenshot_org.jpg
getgreenshot_org.jpg (14.16 KiB) Viewed 1911 times

Re: Count not working in 2015.3

Posted: Fri Feb 26, 2016 8:26 am
by HighAley
Hello.

Maybe you should use Sum function instead of Count?

Also you could use CountIf function:

Code: Select all

{CountIf(DataCategories, Rpt_SalesRegisterDetails.AmountDue != 0)}
Thank you.

Re: Count not working in 2015.3

Posted: Fri Feb 26, 2016 7:00 pm
by jp2code
CountIf worked great!

Thanks.

Re: Count not working in 2015.3

Posted: Mon Feb 29, 2016 6:19 am
by HighAley
Hello, Joe.

We are always glad to help you.
Let us know if you have more questions.

Thank you.