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

Group and filter null field in cross tab row group

6 Answers 219 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Kelum
Top achievements
Rank 2
Kelum asked on 15 Jun 2015, 05:38 AM

I just creating a report that can count number of student for a specific age group .using database record i'm generating those reports

Here it looks like

Age                |  Count

18                   |   344

20                   |   356

30                   |   567

Age Unknown |   323

Age 18, 20 , 30 , I able to count using following Edit Grouping and Edit Filtering options

for example , to count age 18 

in Edit Grouping : = Fields.Age = 18
in Edit Filtering   :  

Expression       | Operator | Value
= Fields.Age     |       =       |    18

I want to get count for "Age Unknown" group if age column null in database , what is the grouping and Filtering syntax for that in telerik 

6 Answers, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 15 Jun 2015, 09:20 AM
Hello Kelum,

You can use the IsNull() function to check the Age column in the database e.g.:

= IsNull(Fields.Age, True) = True

In this example if the Age field is Null the function will return True, otherwise it will return the Age data field value.

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
Kelum
Top achievements
Rank 2
answered on 15 Jun 2015, 09:41 AM
How can I put that in Edit Grouping and Edit Filtering  ?
0
Accepted
Nasko
Telerik team
answered on 15 Jun 2015, 10:59 AM
Hello Kelum,

You can use the same template provided in your first post:

= IsNull(Fields.Age, True) = True

or

Expression | Operator | Value
= IsNull(Fields.Age, True) | = | = True

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
Kelum
Top achievements
Rank 2
answered on 16 Jun 2015, 04:56 AM

your previous solutions working for integer when I try to use string it give this error message

"Cannot perform '=' operation on system.string and system.Boolean

How can I check string values ?

0
Accepted
Nasko
Telerik team
answered on 16 Jun 2015, 07:50 AM
Hello Kelum,

When the data field is of type string you should also pass a string value to the IsNull function's second argument:

= IsNull(Fields.SomeStringField, "NullReplacementString") = "NullReplacementString"

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
Kelum
Top achievements
Rank 2
answered on 16 Jun 2015, 10:26 AM
Thank you very much for your assistance, because of your correct guidance I able to complete my telerik report,

Thanks Lot 
 K
Tags
General Discussions
Asked by
Kelum
Top achievements
Rank 2
Answers by
Nasko
Telerik team
Kelum
Top achievements
Rank 2
Share this question
or