Script in Subreport

Posted by: anuraga on 4 August 2017, 2:54 pm EST

  • Posted 4 August 2017, 2:54 pm EST

    <font face="Arial" size="2">Hi,

    I need to hide / display frames in a subreport.. The subrpeort is a rpx
    file, with VB Script written in the Data_Format section to hide /
    display frames. When I add the report to the Main report, I am
    receiving a script error on the following line

    Rpt.Detail.Controls.Item("frame1").Visible = false

    instead of "Rpt", what should be the correct object that should be used?



  • Replied 4 August 2017, 2:54 pm EST

    You can use either:
        rpt.Sections("Detail").Controls("Frame1").Visible = False
        rpt.Frame1.Visible = False

  • Replied 4 August 2017, 2:54 pm EST

    <font size="3"><font face="Arial"><font size="2">The code lines work fine if you run the report independantly, but as soon as you add the report as a SubReport, and run the Main report, you recieve an error.</font>

  • Replied 4 August 2017, 2:54 pm EST

    What error are you receiving?
Need extra support?

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

Learn More

Forum Channels