SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Need Expression for how to show message when one column is null


Need Expression for how to show message when one column is null

Author
Message
mcfarlandparkway
mcfarlandparkway
SSCommitted
SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)

Group: General Forum Members
Points: 1995 Visits: 765
Hello,
I have a report where I am trying to show message on the top of header

Requirement is I have a report where its group with system name.
when I select ALL in the parameter it will get all the records grouped with system name.
Now I want to show message like if there is no data in first page or 3 page I want to show message like "NO DATA AVAILABLE"

but I am checking like if systemid column has empty I want to show this message but this expression is not working any help...

How to check the null values in database
In the active report it was there like this
if(this.reportDataSet.Tables[0].Rows[cnt]["SystemID"]==System.DBNull.Value)
{
No data available

This is SSRS report how to do it here?
=IIF((First(Fields!SystemID.IsMissing, "DataSet_M"))= "", "No Data Found", Nothing)


Thnx
gbritton1
gbritton1
UDP Broadcaster
UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)

Group: General Forum Members
Points: 1469 Visits: 879
You can check the number of rows returned:


=iif(countrows()=0,"no data", "some data")



but that is for the whole query. Is that what you want?
mcfarlandparkway
mcfarlandparkway
SSCommitted
SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)

Group: General Forum Members
Points: 1995 Visits: 765
No,I don't want to check for all the rows


The problem here is that its grouping with system name

we will get page wise right one page have data and one page may have not data

IF one page has data that's fine if another page is not having data(then I want to show the message)

Is there any property like is missing or anything.
I want to check for systemid that column is null for that page..
Jack Corbett
  Jack Corbett
SSC-Forever
SSC-Forever (46K reputation)SSC-Forever (46K reputation)SSC-Forever (46K reputation)SSC-Forever (46K reputation)SSC-Forever (46K reputation)SSC-Forever (46K reputation)SSC-Forever (46K reputation)SSC-Forever (46K reputation)

Group: General Forum Members
Points: 46407 Visits: 14925
You can use:

=IIF(IsNothing((First(Fields!SystemID.Value, "DataSet_M"))), "No Data Found", Nothing)



I'm not positive i have all the parenthesis right, but IsNothing is the function you are looking for.



Jack Corbett

Applications Developer

Don't let the good be the enemy of the best. -- Paul Fleming
At best you can say that one job may be more secure than another, but total job security is an illusion. -- Rod at work

Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
How to Post Performance Problems
Crosstabs and Pivots or How to turn rows into columns Part 1
Crosstabs and Pivots or How to turn rows into columns Part 2
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search