Current filter:
                                You should refresh the page.
                                Support Center
                                0
                                  • Hi,

                                    I have a report where some detail rows are hidden with e.Cancel = True
                                    in the DetailBand BeforePrint event.

                                    Is it also possible to hide the Group header and footer if all rows in a group are hidden ?

                                    Thanks,

                                    Per

                                • Hi Per,

                                  It seems that we already discussed a similar problem in the suppress group footer if group header is suppressed thread. Please review it and let us know if the problem still exists.

                                  Thanks,
                                  Sergi

                                • Per Olsson 11.25.2010

                                  Hi Sergi,

                                  I am not able to find a solution to my problem in the
                                  thread you suggest.

                                  My problem is that the group header already is printed when I know if I
                                  would like to suppress it.

                                  I am not able to check in advance if there will be any rows in the
                                  group or not.

                                  Thanks,
                                  Per

                                1 Solution

                                Creation Date Rating Importance Sort by
                                0

                                Hi Per,

                                Thank you for your feedback. Now I understand the problem. I can suggest you two approaches to resolve your problem:

                                1. If you can find out which detail bands will be hidden in the GroupHeaderBand.BeforePrint and GroupFooterBand.BeforePrint event handlers, then you can hide corresponding group header and footer.

                                2. You can use the XtraReport.CreateDocument method to generate a report without printing it. In this case, you will be able to get indexes of group headers and group footers that have no detail bands. While printing a report, you should hide these group headers and footers.

                                We look forward to your feedback once you have had the opportunity to try this approach.

                                Thanks,
                                Sergi

                                • Per Olsson 11.26.2010

                                  Hi Sergi,

                                  I think that will solve my problem !

                                  Thanks,

                                  Per

                                • Hi Per,

                                  Please feel free to reactivate this issue if this approach won't help you.

                                  Thanks,
                                  Sergi

                                • Matt Locher 09.19.2015
                                  Hi

                                  I am currently on the same problem and i am wondering how i can get the indexes of group headers and group footers that have no details panel.

                                  As you suggested in approach 2.

                                  My current situation is that i have a report with a second details panel that might have no content. If there is no content i want to hide the band.

                                  Thanks for the help

                                  Matt
                                • Hi Matt,

                                  It seems that you're referring to the DetailReportBand which has a group header and footer. Anyway, I've extracted your question to a separate thread in order to prevent any possible misunderstanding in our discussion: T291868: How to hide GroupHeaderBand and GroupFooterBand if a particular group has no records. Please keep an eye on that thread. We'll process it as soon as we have any updates.

                                  Thanks,
                                  Dmitry

                                • Matt Locher 09.21.2015

                                  Hi Dmitry

                                  Thanks for the support!!

                                  Matt

                                If you need additional product information, write to us at info@devexpress.com 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-2015 Developer Express Inc.
                                All trademarks or registered trademarks are property of their respective owners