Count not working in 2015.3

Stimulsoft Reports.NET discussion
Post Reply
User avatar
jp2code
Posts: 20
Joined: Thu Feb 11, 2016 9:10 pm
Location: Longview, TX [USA]

Count not working in 2015.3

Post 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 1909 times
~Joe
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Count not working in 2015.3

Post 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.
User avatar
jp2code
Posts: 20
Joined: Thu Feb 11, 2016 9:10 pm
Location: Longview, TX [USA]

Re: Count not working in 2015.3

Post by jp2code »

CountIf worked great!

Thanks.
~Joe
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Count not working in 2015.3

Post by HighAley »

Hello, Joe.

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

Thank you.
Post Reply