Page 1 of 1

Add variables from database in a row and get average from all rows

Posted: Thu Apr 11, 2019 12:25 pm
by rscustodio
Hi everybody !! I'm new to Stimulsoft and have some questions that I'm trying to solve.
I have some variables from a database that I have to add together in a row. Once they come from the DB as stings I had to convert to be able to add them together, so I used the following line:

{decimal.Parse(InfoMateriaBoletinBr.NotaNumEv1)+decimal.Parse(InfoMateriaBoletinBr.NotaNumEv2)+decimal.Parse(InfoMateriaBoletinBr.NotaNumEv3)+decimal.Parse(InfoMateriaBoletinBr.NotaNumEv4)}

I have a row at the end of each line in my report to get the totals that I need.
Now I need to get the average from all rows were I have results from my expression. What would be the best way to tackle this question ?

Re: Add variables from database in a row and get average from all rows

Posted: Fri Apr 12, 2019 7:36 am
by Lech Kulikowski
Hello,

You can use the Avg() functions for this task.

If the issue still present, please send us your report with test data and detailed description for analysis.

Thank you.

Re: Add variables from database in a row and get average from all rows

Posted: Fri Apr 12, 2019 12:44 pm
by rscustodio
Sorry if I didn't make my self clear, I need the average in a separated row from the ones that I'm doing the calculations so I can show the totals in one column and the average from the totals in one cell.

Re: Add variables from database in a row and get average from all rows

Posted: Sat Apr 13, 2019 12:23 pm
by Lech Kulikowski
Hello,

Please send us your report with test data and detailed description for analysis.

Thank you.