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 2008 Forums
 Analysis Server and Reporting Services (2008)
 Report Design query

Author  Topic 

cidr
Posting Yak Master

207 Posts

Posted - 2013-04-08 : 05:14:18
Hi All,
I have a particular requirement that is making the design of a report prove difficult.

An example of the data set is like this. (I've obviously simplified the dataset and record names for brevity)


ParentItem Childitem
Parent1 Child1
parent1 Child2
parent1 Child3
Parent2 Child1
Parent2 Child2
Parent2 Child3
Parent2 Child4
Parent2 Child5


What I need is the ParentItem on its own page of the report. Then I need to find a way of having the Childitems below it in 5 blocks in a row on the report (or inside rectangles). If the Parent item had 10 Child items, there would be 2 rows of 5 blocks, each block having the name of the ChildItem. However, there can be more or less ChildItems so I'd need to have only the same amount of blocks as there are ChildItems.

I've tried using a List object but I'm not able to get this working. I've attached an image of the design I'd be looking for.
Does anyone know if there's a way to do this?
Many thanks for any help in advance.



visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-04-09 : 01:12:55
Add matrix as container
Group on ParentField. Select put a pagebreak after in grouping properties.

for getting child in columns add a rownumber field to the dataset.
then add a grouping on ((RowNumber-1)/5) as rowgroup
and for column group add expression as rowNumber ((RowNumber-1)Mod 5)

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

cidr
Posting Yak Master

207 Posts

Posted - 2013-04-10 : 06:56:51
quote:

Visakh 09/04/2013
Group on ParentField. Select put a pagebreak after in grouping properties.

for getting child in columns add a rownumber field to the dataset.
then add a grouping on ((RowNumber-1)/5) as rowgroup
and for column group add expression as rowNumber ((RowNumber-1)Mod 5)



That's a convenient way of doing it. Before I seen your post, I used 5 list containers with a text box in each. For each of the Containers filters I used the IN operator and specified the Row numbers to pull the respective fields. There would never be more than 50 ChildItems so this seems to have worked.

I'll be keeping your technique for future reports with this design.

Thanks :)
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-04-10 : 07:09:13
you're welcome

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
   

- Advertisement -