I have a data table that is getting entries from a commission report into the 5th column, the data type is “string” on the build data table because the source value includes decimals “115.35” for example, I have a for each that reads a report and places the commission value in the dt. I then need to sum that column in the data table. Because I have to use a string for the data table type I am trying to use the CINT function but it is not working…
The column indexing in Data Table starts with 0.
So, for the 5th column use CurrentRow(4)
Also, If you want to add with the decimal digits you can convert the string to double instead of integer by using CDbl(CurrentRow(4))
SumOfReportTotal variable is of Integer type. That is why it is showing the error. It should be of Double type.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.