I'm using Sql Server Reporting Service 2008. Let's say I have a tablix as shown below:
Items 2009 2010 2011
A 10 20 30
B 100 200 300
C 1000 2000 3000
All the values in the year column will be generated dynamically, following years like 2012 and 2013 will be added to the back.
Now that if a particular row item has multiple records in the database, it should be displayed in the row. For example, the Row Item 'C', with ID (report parameter) = 3, shall return 3 records, as shown below:
Items 2009 2010 2011
A 10 20 30
B 100 200 300
C, C1, C2 1000,200,30 2000,300,40 3000,400,50
How do I achieve that? Should I do changes in my stored procedure? Perhaps adding a loop? Or should I specify the tablix expression in SSRS2008?
ps: My stored procedure only includes common select statements. Eg:
Select A, B, C from Products where ID = '@ID';