Hiding total lines in GroupFooter1 & ReportFooter.

Posted by: jww on 4 August 2017, 3:00 pm EST

  • Posted 4 August 2017, 3:00 pm EST

    I am having trouble with hiding total lines in my report. The totals are of fields set up within the report

    The fields are named as shown below, and my testing was with the "Other" set of fields.

    I am working with RPX & DSR only in terms of what I want to change for each report.

    These are set up in datainitialize, rc0 thru rc9 plus Other, for 11 sets of fields:

    Rpt.Fields.Add "rc0Count"

    Rpt.Fields.Add "rc1Count"

    Rpt.Fields.Add "rc2Count"

    Rpt.Fields.Add "rc0Cost"

    Rpt.Fields.Add "rc1Cost"

    Rpt.Fields.Add "rc2Cost" etc.

    They are loaded in Fetchdata and their totals are to be displayed in Groupfooter1 and ReportFooter.

    This is my latest attempt at trying to not display those that have no values in them in GroupFooter1.

    If Rpt.Sections("GroupFooter1").Controls("txtOtherCount1").DataValue = 0 Then

    Rpt.Sections("GroupFooter1").Controls("lblOther1").Visible = False

    Rpt.Sections("GroupFooter1").Controls("lblOther1").Height = 0

    Rpt.Sections("GroupFooter1").Controls("txtOtherCount1").Visible = False

    Rpt.Sections("GroupFooter1").Controls("txtOtherCount1").Height = 0

    Rpt.Sections("GroupFooter1").Controls("txtOtherCost1").Visible = False

    Rpt.Sections("GroupFooter1").Controls("txtOtherCost1").Height = 0

    Rpt.Sections("GroupFooter1").Controls("txtOtherBasis1").Visible = False

    Rpt.Sections("GroupFooter1").Controls("txtOtherBasis1").Height = 0

    Rpt.Sections("GroupFooter1").Controls("txtOther1791").Visible = False

    Rpt.Sections("GroupFooter1").Controls("txtOther1791").Height = 0

    Rpt.Sections("GroupFooter1").Controls("txtOtherBonus1").Visible = False

    Rpt.Sections("GroupFooter1").Controls("txtOtherBonus1").Height = 0

    Rpt.Sections("GroupFooter1").Controls("txtOtherAdjust1").Visible = False

    Rpt.Sections("GroupFooter1").Controls("txtOtherAdjust1").Height = 0

    End If

    The fields listed are the only ones on each line.

    My intent is to not only not display the lines, but shrink the lines and the footer size.

    Canshrink is set to true for each data field and the GroupFooter1.

    It's the shrink part that does not want to cooperate.
  • Replied 4 August 2017, 3:00 pm EST

    Hello ,

    I recommend you to change a visibility of controls in Format event of sections. 

    Also, try to use the following code:

    If Rpt.Sections("GroupFooter1").Controls("txtOtherCount1").Text = "0" Then

    instead of

    If Rpt.Sections("GroupFooter1").Controls("txtOtherCount1").DataValue = 0 Then

    Sergey Romanov.

  • Replied 4 August 2017, 3:00 pm EST

    Thank You for your reply. While it did not seem to make a difference I will defer to greater knowledge.

    It still, however, does not want to shrink the total line after setting all the heights to zero and visibles to false for the line.

    Could this have been addressed in a newer build than I am using. I'm not sure what it is but I know it is perhaps a year old.
  • Replied 4 August 2017, 3:00 pm EST

    It doesn't seem like a bug.

    Could you send me a sample of application?

    Sergey Romanov.

  • Replied 4 August 2017, 3:00 pm EST

    I am not sure what all you want as a sample of the application, but I have created a zip file of the VB code which is basically the same for every report, the RPX file from the report, and the asp page that loads the data for the report. I hope it clarifies what I am trying to do. In my sample test the last line of the summary total group labeled Otherxxxx for each field is the one that will have zero values and should shrink. I see no values, including the label, but the white space remains.
  • Replied 4 August 2017, 3:00 pm EST


    I looked at your files, however it would help greatly if you could provide a running example of the problem (VB6 or simple HTML). A very small sample app with generic data would be best. This will help expedite your fix, if indeed this is a bug.

    Thank you for your understanding.
    Lucas Hardbarger
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels