Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Analysis Server and Reporting Services (2005)
 Displaying Message If No Data

Author  Topic 

rcr69er
Constraint Violating Yak Guru

327 Posts

Posted - 2009-05-26 : 10:34:38
Hi Guys

I have a matrix on my report that displays figures for the current week. On some occasions there will be no figures for the current week meaning that matrix will not display.

Is it possible on the instance that the matrix doesn’t display to show a text box saying ‘No Data’. I was thinking of using the visibility property but wasn’t sure on how to achieve this.

Does anyone know if this possible?

Thanks



visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-05-26 : 12:01:28
You have a property called NoRows available for table,matrix etc. you can give a text messgae like No Data. this message will be displayed when your container doesnt have any data to display. hope this is what you asked for
Go to Top of Page

mzmatterafact
Starting Member

6 Posts

Posted - 2009-07-01 : 15:23:28
Is there a way to format that message when it displays?

I entered the message in the NoRows Property, but it is small and plain when it displays.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-07-02 : 13:06:15
nope. if you want customised message you need to use a textbox and put message inside it as per your format. then change visibility of textbox and table based on rows returned by dataset. if there are rows,make table visible and textbox hidden and when no rows, do the opposite
Go to Top of Page

mzmatterafact
Starting Member

6 Posts

Posted - 2009-07-02 : 14:10:44
quote:
Originally posted by visakh16

nope. if you want customised message you need to use a textbox and put message inside it as per your format. then change visibility of textbox and table based on rows returned by dataset. if there are rows,make table visible and textbox hidden and when no rows, do the opposite



I have a textbox1 and a compared_substances chart to display depending on the norows, and i can understand your reply, but I can't get my If statement to work by using norows element, but it doesn't work. If there is no data returned i want to display textbox1, and if there is data to display then i want the chart to display, but i'm having trouble figuring out the norows.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-07-02 : 14:18:13
nope. for that you shouldnt be changing norows property. for toggling display b/w textbox and table, change hidden property of them and use expression like
for table
=IIF (CountRows("YourDataset")=0, True,False)
for textbox
=IIF (CountRows("YourDataset")=0, False,True)
Go to Top of Page
   

- Advertisement -