How can I set the DataType to Nullable in the Report Designer?
There is DataType field in the Properties and I want to make the DataType a Nullable Decimal.
How can I do this?
Thanks,
This discussion has been closed.
There is DataType field in the Properties and I want to make the DataType a Nullable Decimal.
How can I do this?
Thanks,
Comments
All values can be null by default, but this will cause calculation problems.
Hello!
Since a null value can cause a type conversion error in calculations:
In C# classes, should you declare the field as a decimal? (Or set AllowDBNull = true for the DataTable column.)
In report expressions, check the value for null (or set `ConvertNulls = true`): for example, [([Items.Amount] == null ? “N/A” : [Items.Amount].ToString())], or use `IsNull(“Items.Amount”)` / `Report.GetColumnValueNullable(...)`.