Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Need Expression for how to show message when one column is null Expand / Collapse
Author
Message
Posted Friday, May 2, 2014 7:22 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Monday, December 1, 2014 11:48 AM
Points: 80, Visits: 167
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
Post #1567026
Posted Friday, May 2, 2014 7:33 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Sunday, October 12, 2014 4:00 PM
Points: 341, Visits: 751
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?
Post #1567027
Posted Friday, May 2, 2014 8:49 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Monday, December 1, 2014 11:48 AM
Points: 80, Visits: 167
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..

Post #1567071
Posted Friday, May 2, 2014 10:50 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 2:16 PM
Points: 10,381, Visits: 13,441
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

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
Post #1567119
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse