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

Stimulsoft Reports.NET discussion
Post Reply
rscustodio
Posts: 2
Joined: Thu Apr 11, 2019 11:41 am

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

Post 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 ?
Lech Kulikowski
Posts: 6259
Joined: Tue Mar 20, 2018 5:34 am

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

Post 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.
rscustodio
Posts: 2
Joined: Thu Apr 11, 2019 11:41 am

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

Post 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.
Lech Kulikowski
Posts: 6259
Joined: Tue Mar 20, 2018 5:34 am

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

Post by Lech Kulikowski »

Hello,

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

Thank you.
Post Reply