January 26, 2005 at 4:28 pm
I have two subreports that are contained in one parent report. Each of these subreports has their own unique page header when viewed on their own. When I render the parent report I was expecting to see each of those page headers but the parent page header overrides them. Is this normal? Is there a way to get my subreport page headers to display in the parent report?
Thanks,
Matt
January 31, 2005 at 8:00 am
This was removed by the editor as SPAM
July 18, 2012 at 12:53 pm
I know this is very old post but I have the same need and issue. Were you ever able to find a way to do this?
July 19, 2012 at 7:13 am
in your main report use table and try it.
July 19, 2012 at 8:38 am
I'm sorry but could you be more explicit. I am very new to SSRS and am trying to convert my reports from Crystal.
I have a main report that contains several subreports. Each subreport has a differnt page header and may span multiple pages. I have tried several methods for getting the correct header on each page without success. The closest I get is the header on the first page of each subreport.
I tried setting up a table in the main report for each subreport and setting the tablix header to repeat on each page (what I think you were suggesting and what I found suggested when I googled) but I still am not successful. I may just be missing some minor setting somewhere since as I said I am very new to SSRS. 🙂
July 23, 2012 at 1:20 pm
Page headers/footers will not show up when the report is used as a subreport. You can try to use table headers in the subreports. But then there is the issue that sometimes table headers will not repeat correctly on new pages. It's a very fustrating issue that lots of people have run into. I don't understand why SSRS didn't have a setting on the subreport control that show/hides the page header/footers.
Edit: Check here: http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/c5595d14-4b20-4853-bb32-665c749ac0d4/ for a work around on the table headers. Sometimes it works, sometimes not.
Thanks,
MWise
July 23, 2012 at 2:06 pm
Thanks for the info. I tried numerous suggestions I found on this and other sites including the table header but didn't get any to work. Perhaps I just didn't have the right combination of settings but I will keep working on it. It is extremely frustrating and it is obvious many people have wasted too many hours on something that should be simple in a good reporting tool.
July 23, 2012 at 7:58 pm
I found my work around. Basically you use a datasource in the main report to hold the header values you need, in my case it was just the ReportName, and then you pass that value into a global variable that is set on each tablix holding the subreport and then displayed in the main report header. I like housing my subreports in tablix controls because you can hide/show them based on filters and better control the page breaks between them. I find them a lot easier to use than rectangles to hold subreports.
I have a universal page header for the main report where the just the title changes. The title is a text box and it is set to =Code.GetMyVar(). Each subreport is housed in a tablix where the datasource is the value of the subreport title. I have two rows in each tablix one that contains a text box that calls this =Code.SetMyVar(Fields!ReportName.Value) and another that holds the subreport. This is the code for those functions:
Public Shared Dim MyVar as String
Public Function SetMyVar ( ByVal var as String)
MyVar = var
End Function
Public Function GetMyVar() as String
Return MyVar
End Function
You would do multiple versions of the get/set for different header values and then add multiple text boxes to the first row group in the tablix holding the subreports. It's a hacky workaround, but it does work. It's a mash up of an SSRS 2005 fix to put data in page headers. But really, MS should just have a property setting on the subreport control to show/hide the page headers in the sub.
Good luck,
MWise
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply