Section type

Posted by: darin on 26 March 2019, 2:34 pm EST

    • Post Options:
    • Link

    Posted 26 March 2019, 2:34 pm EST

    In AR6 we are doing the following:

    Dim ARsec As DataDynamics.ActiveReports.Section

            For Each ARsec In myRpt.Sections
                If ARsec.Type = DataDynamics.ActiveReports.SectionType.PageHeader Then
                    ' this is the page header, so it needs to get this information into cells
                    For Each ctrl In ARsec.Controls
                        hadd = False
                        If TypeOf ctrl Is DataDynamics.ActiveReports.TextBox Then
                            txtbox = CType(ctrl, DataDynamics.ActiveReports.TextBox)
    

    i can’t figure out exactly what types to use in AR11.

  • Posted 27 March 2019, 6:10 am EST

    Hi,

    Instead of DataDynamics, we now use GrapeCity.ActiveReports.SectionReportModel namespace for sections and controls in SectionReport.

    You need to check the type of the required section and when it is found, you can access the controls in that section and do the required operation.

    Code snippet for the accessing Page Header section is:

     Private Sub Report_ReportStart(sender As Object, e As EventArgs) Handles MyBase.ReportStart
            Dim d As GrapeCity.ActiveReports.SectionReportModel.PageHeader
            d = Me.PageHeader
            Dim type1 As Type = d.GetType
            Dim type2 As Type = GetType(GrapeCity.ActiveReports.SectionReportModel.PageHeader)
            If (type1.Equals(type2)) Then
                For Each ctrl In d.Controls
                    If (TypeOf ctrl Is GrapeCity.ActiveReports.SectionReportModel.TextBox) Then
                        CType(ctrl, GrapeCity.ActiveReports.SectionReportModel.TextBox).Text = "This is the PageHeader section of Section Report"
                    End If
    
                Next
            End If
        End Sub
    

    A sample report has been attached for your reference.

    Best Regards.

    AccessSectionInReport.zip

  • Posted 27 March 2019, 7:43 am EST

    Thanks. my issue was ARSec was defined incorrectly. Thanks for the help.

Need extra support?

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

Learn More

Forum Channels