I have an Word-Template file in which I loop through the list of “Oberkonto” and each “Oberkonto” object has a list of “Unterkonto”.
This works so far, but when I would like to get the sum of a specific property “SollMonat” of “Unterkonto” then, I get the following error:
An error has been encountered at the end of expression 'u.Sum(p => '. Can not iterate over an instance of type ‘Data_Helper.Models.Unterkonto’
Looping through the list and display the property per “Unterkonto” is not the problem,
but when I would like to get the sum of the property, then I get the error:
Here is the example project, in which I get the error:
Sum_Test.zip (497.2 KB)
Thank you in advance for your answer!