Page 1 of 1

Total

Posted: Wed Sep 07, 2016 10:12 am
by sara.nogueira
Hi,

I am using ViewerFx_PHP version 2016.1.17

and i need to do a report summary where i need to count all the events of a filed.
In my Databand i have a field called "Descrição" wich have different values possible and i need to know how many times occures 'Toner Preto' and the sum of 'Toner Cyan' + 'Toner Amarelo' + 'Toner Magenta'.
I found a way to do the 'Toner Preto' occurance, but not the sum of the other 3. How can i do it?

Thanks in advance
Sara

Re: Total

Posted: Thu Sep 08, 2016 9:14 am
by Alex K.
Hello,

Can you please send us a test data for your report (for example sql script for MySql).

Thank you.

Re: Total

Posted: Thu Sep 08, 2016 2:21 pm
by sara.nogueira
i cant do that. is there any other way to help you understand what i need?

What i want is this to be able to count the amount of times a string appears in a filed. I was able to do that for one string, but i cant do it to more then one.

{CountIf(Equipamentos.Descri=="Toner Preto")}

what i would like to do is : {CountIf(Equipamentos.Descri=="Toner Cyan" + CountIf(Equipamentos.Descri=="Toner Magenta" + CountIf(Equipamentos.Descri=="Toner Amarelo" } but in my report that doesnt count properly. it allways appear he same value as the expression for 'Toner Preto' so if the Count('toner Preto') is 1, the sum of the other 3 is going to be 3...

The csv that i sent you is a realistic data set.

Re: Total

Posted: Sat Sep 10, 2016 12:36 pm
by Alex K.
Hello,

Please try to use the additional variables, which calculate in expression:
{Variable1 = CountIf(Equipamentos.Descri=="Toner Preto")} etc
and then use
{Variable1+Variable+...}

If the issue still present, please send us a test data for your report.

Thank you.