Total

Stimulsoft Reports.PHP discussion
Post Reply
sara.nogueira
Posts: 10
Joined: Wed Jun 15, 2016 11:33 am

Total

Post 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
Attachments
example.mrt
(59.3 KiB) Downloaded 389 times
Desperdícios mensais.csv
csv with data example
(4.66 KiB) Downloaded 267 times
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Total

Post by Alex K. »

Hello,

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

Thank you.
sara.nogueira
Posts: 10
Joined: Wed Jun 15, 2016 11:33 am

Re: Total

Post 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.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Total

Post 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.
Post Reply