This is a migrated thread and some comments may be shown as answers.

Entire expression returns null if any of its part is null

2 Answers 451 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Amar
Top achievements
Rank 1
Amar asked on 22 Jul 2015, 09:40 AM

Hi,

I am facing a problem in binding the reports data with expressions. I am using the below expression-

=Fields.Name + ", " + Fields.Address + ", " + Fields.PhoneNo

In this, if any part(like Fields.Name) is null then it makes the whole expression to return null and it leaves the line blank on the report. ​I expect it to concatenate the strings and if there is any null value then it should ignore and should give us the rest as the output(Which is the default behaviour of .Net)

 Please suggest if there is any option to change its behaviour of dealing with null values or is there any alternative ?

 

2 Answers, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 24 Jul 2015, 02:10 PM
Hello Amar,

The IsNull() conditional function or the  operator (??) can be used in the expression to replace null values with an empty string or another value of your choice.

Regards,
Nasko
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Amar
Top achievements
Rank 1
answered on 05 Aug 2015, 05:13 AM
Thanks.
Tags
General Discussions
Asked by
Amar
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Amar
Top achievements
Rank 1
Share this question
or