For those of you that are not aware of this function in SQL Server Reporting Services, the VAL() function allows one to extract the numerical part of a field.
This is a great little function, if one wishes to strip out the number part of an address field:
=VAL(Fields!Address1.Value)
However, when the client used this with another field, the resultant output showed zeros.
The issue is that although the function VAL will extract the numerical part of a data field, it will only do so if the numerical characters occurs first, and it will return all the numerical characters up to the first string character it encounters.
If the first character of the data field is not a number, it will stop looking, and return a value of 0.
If you have any questions, leave us a comment below, or need any assistance, please do not hesitate to Contact Us |