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

Conditional Formatting OR condition

3 Answers 319 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jon Morris
Top achievements
Rank 1
Jon Morris asked on 13 Mar 2010, 07:37 PM
Hi,

I am trying to use conditional formatting for a report and what I want to do is compare a field to 2 static values and if TRUE, highlight the text. I am unable to get the syntax correct for the condition. This is what I am trying to achieve.

Compare the field "Type" to both an empty string and also to static text "Upset". I tried to do the following the Conditional Formatting Rules dialog

=Fields.Type = Upset

This works fine. But, if I add NULL to this(to compare to empty string)

=Fields.Type = Upset OR = Null

nothing happens. I tried to use the "IN" operator, but no luck in figuring out the syntax. Is there some documentation that I can use as  a reference or can you point me to the correct syntax?

Thanks

3 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 17 Mar 2010, 10:15 AM
Hi Jon Morris,

You have to nest IsNull Function into an IIF function. Check out the following example :

Expression                                                                                               Operator                                       Value
===============================================================================
=IIF(Fields.Type= "Upset",True,IsNull(Fields.Type,True))                            =                                               True

Hope this helps.

Regards,
Peter
the Telerik team

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 Public Issue Tracking system and vote to affect the priority of the items.
0
Brad Williams
Top achievements
Rank 1
answered on 17 Mar 2010, 02:53 PM
I to am having trouble figuring Telerik report conditional formating.  It is so much backward thinking.  Sometimes you use Expressions, sometimes conditional formating and who know when to use either.  I can't find any documention on syntix or detail instructions for learning conditional formating.  They need to put a whole training series on it if then can't do a better job explaining it.
0
Jayesh Goyani
Top achievements
Rank 2
answered on 27 Aug 2010, 10:41 AM
Hello Peter ,

i got this Error "An error has occurred while processing TextBox 'textBox3': Cannot perform '='  " when i use following expression for handling DBnull / Null value in Report.

1)
Expression ->  = IsNull(Fields.Saturday, "True")   
Operator ->      =
Value ->          = True

2)
Expression ->  =IIF(Fields.Saturday= "Test",True,IsNull(Fields.Saturday,True)) 
Operator ->      =
Value ->          = True

i want to set background color in TextBox when Fields.Saturday.value is DBNull or "Test".

how can i do this ?
Tags
General Discussions
Asked by
Jon Morris
Top achievements
Rank 1
Answers by
Peter
Telerik team
Brad Williams
Top achievements
Rank 1
Jayesh Goyani
Top achievements
Rank 2
Share this question
or