• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 871
  • Last Modified:

sum in telerik report


I am using telerik report now i want to do sum of two column so i am using following experssion

=Fields.FirstNumber + Fields.SecondNumber

but if any of the fields are null , then it is not adding ,

please suggest how to do it.
  • 2
1 Solution
RobOwner (Aidellio)Commented:
You will need to test if either the Fields.FirstNumber or Fields.SecondNumber is null/nothing before doing the assignment.


Dim firstNumber as Integer
Dim secondNumber as Integer
Dim thirdNumber as Integer

firstNumber = 0
secondNumber = 0

if (Not Fields.firstNumber is Nothing) then firstNumber=Fields.firstNumber)
if (Not Fields.secondNumber is Nothing) then secondNumber=Fields.secondNumber)

thirdNumber=firstNumber + secondNumber

Open in new window

praveen1981Author Commented:
Many thanks.
RobOwner (Aidellio)Commented:
No problem. What was you reasoning for the B grade? Just would like to know for my own understanding.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now