Microsoft report viewer subreport, footer of subreport not showing up
I'm using the MicrosoftReportViewer in VS2008, to display a report in a asp.net applicaiton (mvc).
I have a subreport on my report.
In my footer on the subreport, I have a textbox that displays the sum of one of the columns. and another text box with a label for the sum box.
Neither of these show up in my report when开发者_如何转开发 I run it. All of the data in the body shows up fine.
If I move the textboxes to the bottom of the body of the report, it says I cant have an aggregate funciton that is not in a header or a footer.
I created the footer originally to solve the aggregate problem, so I have not tweaked any settings from stock, if that's a clue.
Any one know what I need to do to get my footer to show uop?
Any help or hints are Appreicated.
C-
I just ran into the same problem. Anyone know the answer?
EDIT: Hmmm...seems like this might be impossible.
See: http://www.visualstudiodev.com/visual-studio-report-controls/page-footer-not-visible-sub-report-32148.shtml
EDIT 2: A subreport will not display any page sections or run any page related events. You will need to use the main report footer. It seems there can only be one page footer and the main report is the logical one to use.
Found a suggested workaround: You can manipulate the main report page footer from the subreport by using code in a subreport event procedure. For example, if you put a text box named txtSubTitle in the main report page footer section, then the subreport's report header section's Format event procedure can do something like:
Parent.txtSubTitle = "my subreport something"
EDIT 3: Alternate workaround, which I'm going with: Add a table to the subreport body. Add your subreport "footer" to the table's footer section. Have the table's footer section repeat on each page. Ta-dah!
精彩评论