Find the Numeric Value in the Dataset Field
In bold reports, when dealing with datasets that have a mix of strings and numbers, users can extract and sum numeric values from dataset fields containing a combination of strings and numbers by following these steps:
-
Use the below-mentioned expression to identify numeric values within the field.
Expression: =IIf(IsNumeric(Fields!field1.Value), Fields!field1.Value, 0)
This expression checks if the content of field1 is numeric. If true, it returns the numeric value; otherwise, it returns 0.
-
To calculate the total sum of the identified numeric values across multiple records, use this expression.
Expression: =Sum(IIf(IsNumeric(Fields!field1.Value), Fields!field1.Value, 0))
This expression sums up the numeric values for each record, considering only those identified as numeric.
-
Click Preview to see the output in the report viewer.
-
Click here to download the sample report.