This week I have been looking at sub reports within RDLC and specifically dynamic reports where the dimensions of a table within the report are not known until runtime. I managed to solve the dynamic table problem from an article posted here and adjusted the example to show the formatting required. However, the report needed header and footer information so this looked to be quite troublesome editing the dynamic code. I also wanted the same header and footer information on a number of dynamic reports. Thats when I came across sub reports.
I created a basic RDLC with the required parameters to support the header and footer info and added a sub report. In the code I then populate a dataset with all the data required from my WCF middle tier and use the dynamic table functions to generate the report definition stream. This stream is then fed into the sub report and the report is shown in report viewer. The only tricky part was sending the dataset into the sub report and I found the solution on the MSDN forums. I'll post up some code next week
Running is going ok at the moment and I'm five miles short of two hundred miles for the year. However, had a a pretty bad fall on Thursday and injured my hand quite badly. Healing ok now but I had to pull half a branch out of my wrist which wasn't nice. Should crack the two hundred mile mark this weekend with some friends.