Current filter:
                                You should refresh the page.
                                Support Center
                                  • I have a question similar to Q361278.

                                    I have report bound to a POCO datasource that looks like this:

                                    class MyDataSource
                                          List<DetailBandData> Bands{get;set;}

                                    My Report is bound to List<MyDataSource>, and is laid out as follows:
                                    DetailReport - "Bands"
                                      GroupHeader (groups on field a)
                                      Detail (shows Band Detail)
                                      GroupFooter (sums field a)

                                    The report renders perfectly, but I have a requirement to hide the GroupFooter if the DetailBandData object being processed meets a certain criteria. So I've tried handling the GroupFooter's BeforePrint event, only when I call GetCurrentRow(), it returns an instance of the PARENT (MyDataSource), not an instance of DetailBandData, which is the current list item being processed the DetailReport.

                                    Why is GetCurrentRow() returning the parent and not the child row in the current context? Am I looking at this wrong? If so, how do I know which child row the GroupFooter is being rendered for?



                                My apologies, when I set up a test project using the parameters I described above, it worked as expected.

                                I am attaching a sample project illustrating the problem.

                                The only difference I can see is that in my project, there is an additional level of nesting for the data.

                                Hopefully the test project helps you guys see what I mean. Please let me know what you think.



                                Hello Ben.

                                Thank you for your message. This behavior is caused by the fact that the GetCurrentRow method returns the main report data. To solve this issue, call this method for the corresponding DetailReportBand. Please modify your code as follows:

                                private void ItemDetailCategoryGroupFooter_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e) { GroupFooterBand band = sender as GroupFooterBand; //Here, I expect an instance of ReportLineItemsBandData, but instead get an instance of SalesByItemDetailReportData var rowData = band.Report.GetCurrentRow(); }
                                I hope this will help you achieve the required functionality.

                                Best regards,


                                Perfect. Exactly what I needed. Thanks!!


                                Hello Ben,

                                I am glad to hear that the problem has been resolved. Thank you for letting us know of your progress.
                                Please feel free to contact us if you have any difficulties. We will be happy to assist you.


                                If you need additional product information, write to us at or call us at +1 (818) 844-3383

                                FOLLOW US

                                DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, ASP.NET, WinForms, HTML5 or Windows 10, DevExpress tools help you build and deliver your best in the shortest time possible.

                                Copyright © 1998-2017 Developer Express Inc.
                                All trademarks or registered trademarks are property of their respective owners