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

SSRS: How to make two tables have the same number of row Expand / Collapse
Author
Message
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)
dataset2(MDX)

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.

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

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, March 19, 2014 6:05 AM
Points: 11, Visits: 282
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...



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

Add to briefcase

Permissions Expand / Collapse