Crystal Reports & SQL Reporting Services Training Consultants
Account Log in:
Username:
Password:
Experience is what one gets when one is expecting something else
 
Institute of IT Trainers - Freelance Trainer of the Year 2006 & 2009
Liverpool Business Connect Member
  Maximum Impact Solutions Limited - Reporting Solutions, Creating Answers
Reporting Solutions - Creating Answers, Crystal Reports, Dashboarding (Xcelsius) & SQL Reporting Services

The Maximum Impact Solutions Blog Feed ME!!!!

18
February

Why is my VAL function not working in SQL Server Reporting Services?

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

MAKE A COMMENT

Name *

Email Address *

Comment *