Sum of repeater line


#1

Hey everyone,

I`m trying to get the sum of a LINE (not a row) of the repeater, based on the name I chose on a dropdown list, like the picture:

So, if the selected option is “Rede” I need the sum = 68000 - 68355,59 (values from “Rede” from the list on the line) and update the same line of the repeater on the last item “Diferença simulada”.

Is it possible?


#2

Yes, it is possible. I would recommend adding a column in your repeater to track whether to show the “Diferença simulada”.

For example, if you want to perform this calculation for any given row, set the value of this column to “true”. Then add a conditional case to the repeater’s Item Loaded event to perform the summing algorithm. For example, “IF columnDS equals “true” Set Text of valueDS to [[Item.columnRB - Item.columnRA]]”.

To perform the calculation on the “Rede” row, just update the repeater with the rule:
[[Item.columnAdquirente == “Rede”]] and set columnDS to value of “true”.

If this doesn’t make sense, I could show an example if you can upload your .rp file.


#3

@mbc66 Thank you for the response!

I managed to get the sums as you instructed, thanks


closed #4

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.