cCountIf in version 2017.1.10

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

cCountIf in version 2017.1.10

Post 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 1187 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: 6245
Joined: Tue Mar 20, 2018 5:34 am

Re: cCountIf in version 2017.1.10

Post 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.
alepage
Posts: 53
Joined: Mon Jan 19, 2009 7:02 am
Location: France

Re: cCountIf in version 2017.1.10

Post by alepage »

Hello Lech,

All is OK yet.

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

Re: cCountIf in version 2017.1.10

Post by Lech Kulikowski »

Hello

We are always glad to help you!

Thank you.
Post Reply