cCountIf in version 2017.1.10

Stimulsoft Reports.Net discussion
Post Reply
alepage
Posts: 46
Joined: Mon Jan 19, 2009 7:02 am
Location: France

cCountIf in version 2017.1.10

Post by alepage » Fri May 15, 2020 7:40 am

Hi,

When I use the cCountIf formula in a band, I get the expected result. But If I want to make invisible the page with a condition because there is no data corresponding to the criteria, I got an error that explaining there is no fot the cCount methode in the argument '2'. My Condition looks like this :
cCountIf_formula.jpg
cCountIf_formula.jpg (18.58 KiB) Viewed 201 times
With the same report, I get no error in a older version 2012.1.1300 of the designer.

Thanks for your help.
Arnaud
Lech Kulikowski
Posts: 2575
Joined: Tue Mar 20, 2018 5:34 am

Re: cCountIf in version 2017.1.10

Post by Lech Kulikowski » Tue May 19, 2020 11:38 am

Hello,

1. cCount counts the number by the already rendered page, so in this case, in Condition it makes no sense, you can only check the total number of Count.

2. yes, there was no error before, but the condition did not work anyway.
In our engine, in text components and events, functions are considered in different ways, in events through Totals and without conditions.
The workaround is replaced by a summation with a ternary operation:
Sum(DataBand1, ARTICLE._NUMELEMENT=="" ? 1 : 0) == 0

Thank you.
alepage
Posts: 46
Joined: Mon Jan 19, 2009 7:02 am
Location: France

Re: cCountIf in version 2017.1.10

Post by alepage » Tue May 19, 2020 2:27 pm

Hello Lech,

All is OK yet.

Thanks for you reply.
Arnaud
Lech Kulikowski
Posts: 2575
Joined: Tue Mar 20, 2018 5:34 am

Re: cCountIf in version 2017.1.10

Post by Lech Kulikowski » Tue May 19, 2020 2:38 pm

Hello

We are always glad to help you!

Thank you.
Post Reply