The variable have the operation aritmethic MainVariable: RosterSections.Select(x=> (x.ProductValue??0) - (x.HelpReceived??0)).ToArray()[@rowcode-1]
The last explication create an array like this: [ValueSection1, ValueSection2, ValueSection3, ValueSection4,...,ValueSection22]
But if I want to access at the value of each section I should to create each variable for each item in the array.
Like this way ValueInSection1 = RosterSections.Select(x=> x.MainVariable).ToArray()[0] ValueInSection2 = RosterSections.Select(x=> x.MainVariable).ToArray()[1] . . . ValueInSection22 = RosterSections.Select(x=> x.MainVariable).ToArray()[21]
But I would like to know an optimal and more efficient way to do this.
my sense is that you wish to display them as separate values in the screen report/summary section. Hence they must be calculated and stored as separate variables, that would be later accessible in text substitution %varname%.
You could probably simplify the notation with a macro: