Hide a Section of GroupHeader (FlexReport)

Posted by: c1 on 23 January 2020, 1:07 am EST

    • Post Options:
    • Link

    Posted 23 January 2020, 1:07 am EST

    Hi folks,

    i have a groupheader in flexreport with 3 subsections.

    I like to hide subsections 1 and 2 if grouppage() > 1 and have try to insert vbscript like this:

    if grouppage() > 1 then 
    GroupHeader.subsection(1).visible = false
    else
    GroupHeader.subsection(1).visible = true
    endif
    

    I test this code on different events (onPage, onGroupHeader_print, onGroupHeaderFormat) but nothing works.

    Thanks in advance for any idea to solve this.

    Niels

    p.s.

    I wondering that code like ```

    textfield.text = grouppage()

  • Posted 24 January 2020, 8:24 pm EST

    Hi folks,

    i found a workaroud for this topic.

    Instead using the grouppage() function i placed a hidden textfield (CustomerIDSave.) to the first section of the groupheader and use following vbscript on Group_Header.onFormat

    if CustomerIDSave.Text <> "" & CustomerID then 
      CustomerIDSave.Text = "" & CustomerID 
      Group_Header.SubSections(2).Visible = true
    Else
      Group_Header.SubSections(2).Visible = False
    endif
    

    Greatings

    Niels

  • Posted 26 January 2020, 6:09 pm EST

    Hello,

    The workaround you use is correct as the GroupPage(s) finally update the values once the report has completely rendered. So, using a hidden TextField is a good option to hide subsections conditionally.

    Regards,

    Esha

Need extra support?

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

Learn More

Forum Channels