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)
 Table question

Author  Topic 

helixpoint
Constraint Violating Yak Guru

291 Posts

Posted - 2011-12-05 : 12:07:38
I am populating a table. My question is if there is no records, I want to have one empty row show up. What is the best way to do this?

Dave
Helixpoint Web Development
http://www.helixpoint.com

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-12-05 : 12:21:55
Are you telling about report table or sql table?
If report table, you've no rows property which you can set. So in case your query doesnt return any results, it will still show a single row with value set for the property

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

helixpoint
Constraint Violating Yak Guru

291 Posts

Posted - 2011-12-05 : 12:57:03
Report table. I see a NoRowsMessage, but that will not work

quote:
Originally posted by visakh16

Are you telling about report table or sql table?
If report table, you've no rows property which you can set. So in case your query doesnt return any results, it will still show a single row with value set for the property

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/





Dave
Helixpoint Web Development
http://www.helixpoint.com
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-12-05 : 13:01:52
quote:
Originally posted by helixpoint

Report table. I see a NoRowsMessage, but that will not work

quote:
Originally posted by visakh16

Are you telling about report table or sql table?
If report table, you've no rows property which you can set. So in case your query doesnt return any results, it will still show a single row with value set for the property

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/





Dave
Helixpoint Web Development
http://www.helixpoint.com


Why do you think so?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

helixpoint
Constraint Violating Yak Guru

291 Posts

Posted - 2011-12-05 : 14:52:59
Because I have a Rectangle in a table with textboxes in it. I need them to show at least once

Dave
Helixpoint Web Development
http://www.helixpoint.com
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-12-05 : 23:40:59
quote:
Originally posted by helixpoint

Because I have a Rectangle in a table with textboxes in it. I need them to show at least once

Dave
Helixpoint Web Development
http://www.helixpoint.com


hmm? you mean you need to show textboxes even when there's no data?
that doesnt make much sense

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

helixpoint
Constraint Violating Yak Guru

291 Posts

Posted - 2011-12-06 : 08:43:02
Yea. I know. They just want to see an empty record if there is none.


quote:
Originally posted by visakh16

quote:
Originally posted by helixpoint

Because I have a Rectangle in a table with textboxes in it. I need them to show at least once

Dave
Helixpoint Web Development
http://www.helixpoint.com


hmm? you mean you need to show textboxes even when there's no data?
that doesnt make much sense

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/





Dave
Helixpoint Web Development
http://www.helixpoint.com
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-12-06 : 10:27:12
then use union all to add default values

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -