Current filter:
                                You should refresh the page.
                                0
                                  • I am trying to suppress a group footer if and only if the corresponging group header is being suppressed.

                                    In the before print event o f the group footer, the only pertinent information I have available (that I can see) is the group level. This helps, but is not enough. I want to suppress a group header only if the corresponding group header (with the same group value) was suppressed.

                                    As an example:

                                    GroupHeader rose
                                    GroupHeader violet
                                    GroupHeader aster

                                    GroupFooter rose
                                    GroupFooter violet
                                    GroupFooter aster

                                    I fI suppress the GroupHeader with a group value of aster, I also want the GroupFooter with a group value of aster suppressed.

                                     I can set a flag or variable with the group level when I suppress the GroupHeader, but I only want to suppress the corresponding groupfooter with the same group value.

                                    In my actual report I have a variable number of group levels.

                                    How can I do this in code?

                                0

                                Update on this problem.

                                I am trying to suppress a group footer instance if the current value of the group field is zero.
                                I thought by binding the groupfooter tag to the groupfield and then checking the GetCurrentColumnValue in the BeforPrint event of the group footer (using the groupfooter tag to get the column name) I could do it. However, when I put a stop in the GroupFooter BeforePrint event, the value of the tag is empty, i.e., "".

                                Below is the code I used to bind the groupfooter tag to the group field:

                                Dim GroupFooterBinding As XRBinding
                                GroupFooterBinding = New XRBinding("Tag", inDataSource, GroupList(k).FieldName)
                                Report.Bands(GroupFooter).DataBindings.Add(GroupFooterBinding)

                                Here is the BeforePrint event handler to suppress the groupfooter.

                                Private Sub BeforePrintGroupFooter(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintEventArgs)
                                        If CType(sender, GroupFooterBand).Report.GetCurrentColumnValue(CType(sender, GroupFooterBand).Tag.ToString) = "0" Then
                                            e.Cancel = True
                                        End If
                                 End Sub

                                I assume it is possible to bind to a group footer tag and then examine the value at a later date.

                                What am I missing?

                                Thanks.

                                0

                                Hello Mike !

                                We've updated our example to support multiple group levels. In order to hide a correct "header-footer" pair, BeforePrint events check the
                                Level property of the current GroupHeaderBand within a document.
                                Please let us know if it's suitable for you.

                                Thanks,
                                Alex.

                                GroupHeaderLevels.zip
                                You must  log in  or  register  to leave an answer

                                Is your intention to post an answer to your own question?

                                • If so, then proceed.
                                • If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
                                • If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.