Page 1 of 1

cCountIf in version 2017.1.10

Posted: Fri May 15, 2020 7:40 am
by alepage
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 1190 times
With the same report, I get no error in a older version 2012.1.1300 of the designer.

Thanks for your help.
Arnaud

Re: cCountIf in version 2017.1.10

Posted: Tue May 19, 2020 11:38 am
by Lech Kulikowski
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.

Re: cCountIf in version 2017.1.10

Posted: Tue May 19, 2020 2:27 pm
by alepage
Hello Lech,

All is OK yet.

Thanks for you reply.
Arnaud

Re: cCountIf in version 2017.1.10

Posted: Tue May 19, 2020 2:38 pm
by Lech Kulikowski
Hello

We are always glad to help you!

Thank you.