Question : Tables with fixed number of rows

How do I define a table with a fixed number of rows? Suppose I always want there to be 20 rows but sometimes the dataset being bound to the table has less than 20 - how do I setup the table so it always has the empty rows displaying?

Assume my table has one level of grouping defined

Answer : Tables with fixed number of rows

Hmm, interesting question.  As far as I know, the only way that you could achieve that is by ensuring that your dataset always contains 20 rows.  If you have less than 20 rows to show, you could add empty records to the dataset until the number of rows is 20.

You'll probably have to use a stored procedure to do that.  In that stored procedure I would create a table variable, then insert the data that you need into that table variable, then add empty records into that same table variable until recordcount is 20, and then return the content of the table variable.

If you need info on how to use stored procedure from SSRS, I wrote the following article: http://www.experts-exchange.com/articles/Microsoft/Development/MS-SQL-Server/MS-SQL_Reporting/Reporting-On-Data-From-Stored-Procedures-part-1.html
Random Solutions  
 
programming4us programming4us