Click here to monitor SSC
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase

SSRS: How to make two tables have the same number of row Expand / Collapse
Posted Tuesday, March 12, 2013 11:28 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, April 18, 2013 4:24 AM
Points: 1, Visits: 20
hi experts

I have the following

dataset1(MDX) (always has more rows than dataset2)

tablix1(source is dataset1)
tablix2(source is dataset2)

what i need to accomplish is to have same number of rows for both tablix1 and tablix2
for example: if the dataset1 gives 27 rows and dataset2 gives 14 rows, i wanted to have 27 rows for tablix1 and also 27 rows for tablix2(having 14 rows filled with the result set of dataset2 and 13 empty rows).

is therer any way to add empty rows to a table ? ( I use SSRS 2008 )

Thank you in advance.

Post #1430218
Posted Thursday, March 14, 2013 2:01 AM


Group: General Forum Members
Last Login: Wednesday, March 30, 2016 12:35 AM
Points: 14, Visits: 359
Hi Nestor,

I am not sure of the actual requirement and costraints around your tables, but i think you can try .....

Take the differnece of Table rows with help of a variable/function.

Create a stored procedure and loop the empty insert ('') command as many times as variable.. where variable > 0.
I think then you can have the equal number or rows in both the tables...

- Satish
Post #1430806
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse