AR13 SectionReport Inherithance issue

Posted by: cocciolo on 20 February 2020, 10:04 pm EST

  • Posted 20 February 2020, 10:04 pm EST

    Hi all,

    I’m using AR v13.0.16184 with VS Professional 2017.

    I converted a report from version 4.0, I’m able to correctly compile the .vb project, but when I launch the report I’m facing this issue:

    Report must inherit from GrapeCity.ActiveReports.SectionReport or a inherited SectionReport object with the MasterReport property set to true.

    This is the code that generates the error:

    
    Private Sub GroupHeader9_Format(ByVal sender As Object, ByVal e As System.EventArgs) Handles GroupHeader9.Format
            Dim objRepTemp As New SectionReport
            Dim rptType As Type
            Dim Lam As String = ""
            Lam = Me.myFields("SelLam").Value.ToString()
    
            Select Case myFieldsCollection.Item("code").Value
                Case "01"
                    rptType = GetType(SubRipristinoTipo01Active)
                Case "02"
                    rptType = GetType(SubRipristinoTipo02Active)
                Case "03"
                    rptType = GetType(SubRipristinoTipo03Active)
                Case Else
                    rptType = GetType(SubRipristinoTipo01Active)
            End Select
    
            objRepTemp = Activator.CreateInstance(rptType)
            Dim dataset as New Dataset()
    	Me.SubReport1.DataSource = dataset          
    	Me.SubReport1.DataMember = dataset.Tables(member).TableName
            Me.SubReport1.Report = objRepTemp 
            Me.SubReport1.Report.Fields.Add("SelLamie")
            Me.SubReport1.Report.Fields("SelLamie").Value = Lam
    
        End Sub
    
    

    Could anyone help me?

    Thanks in advance,

    Mino

  • Posted 24 February 2020, 9:32 pm EST

    Hello Mino,

    It is hard to say what is the real issue. Could you please provide me the stripped-down sample so that I can replicate the issue at my end and assist you accordingly.

    Also, you can try using the following code:

    objRepTemp.MasterReport = False 
    

    Thanks,

    Mohit

Need extra support?

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

Learn More

Forum Channels