Accept changes (e.g., remove deleted rows) and sets all blank String and Date fields in a DataTable to DBNull.Value and also all Integer columns with a name that ends 'Pk' and have a value of zero to DBNull.Value.

Columns will only be cleaned if they are not read-only. This is useful if a DataTable has been populated by setting columns from a Business Layer object which will returns zeros and blank Strings instead of DBNulls for primary keys and blank strings.

Syntax

ISReportFunctions.CleanDataTable(dataTable, [convertNullCurrencyToZero], [removeColumnPrefix])

Parameters

NameTypeOptionalByRefDescription
dataTable DataTable The DataTable to Clean.
convertNullCurrencyToZero Boolean Optional Indicates whether to Convert Null Currency (Decimal) columns to Zero. If omitted, a value of False is assumed.
removeColumnPrefix String Optional All columns with the specified prefix will be removed.
Member of:
ISReportFunctions
Namespace:
Intersoft.ISReports6
Assembly:
ISReports6, Version=6.0.3
Target Framework:
.NET 9.0