Datatable group colums

i have this, and it work:

(From d In dtOut.AsEnumerable
Group d By k=d(“Field1”).toString.Trim, d(“Field2”).ToString.Trim Into grp=Group
Let cs1 = grp.Sum(Function (x) Convert.ToDouble(x(“Field3”).toString.Trim))
Let cs2 = grp.Sum(Function (x) Convert.ToDouble(x(“Field4”).toString.Trim))
Let ra = New Object(){k,cs1,cs2}
Select dtResult.Rows.Add(ra)).CopyToDataTable

I need to add Field5 to Group by
Group d By k=d(“Field1”).toString.Trim, d(“Field2”).ToString.Trim,d(“Field5”).toString.Trim Into grp=Group

but this return error.

Can anyone help me?


which error is returned?

The error is “La variabile di intervallo Trim è già dichiarata”

have a check on the yellow marks. The key variables were ommitted:

then it was validating

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