Dim t As Table = e.form.Controls("Table1").Table
For Each r As Row In t.Rows
r("amount") = e.Form.Controls("NumericComboBox2").value * r("tjs") / t.Compute("Sum(tjs)")
Next 根据你的代码我设置了随机分割金额, DataTables("金额").DataRows.Clear()
Dim hs As Double= e.Form.Controls("NumericComboBox2").value
Tables("金额").AddNew(hs)
DataTables("金额").DataCols("金额").SetFormat("0.00")
Dim t As Table = e.form.Controls("Table5").Table
For Each r As Row In t.Rows
r("金额") = e.Form.Controls("NumericComboBox1").value * r("序号") / t.Compute("Sum(序号)")
Next
Dim r1 As Row = Tables("金额").Rows(0)
r1("金额") = 0
r1("金额") = e.Form.Controls("NumericComboBox1").value - t.Compute("Sum(金额)")
Tables("金额").Cols("金额").GrandTotal = True
Tables("金额").GrandTotal = True
左边是没有格式的实际四位小数金额,右边是保留格式化的金额,希望除完实际最多就是两位小数的金额该怎么设置呢?