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