Using external report as a subreport.
Posted: Thu Apr 03, 2008 3:37 am
Hi Guys.
I updated to the newest version of Stimulsoft and now subreporting does not work any more.
The data.position stays at 0. Any idea what is going on?
Thanks.
I updated to the newest version of Stimulsoft and now subreporting does not work any more.
Code: Select all
Dim parentReport As Stimulsoft.Report.StiReport = TryCast(sender, Stimulsoft.Report.StiReport)
If parentReport Is Nothing Then
Exit Sub
End If
Dim comp As Stimulsoft.Report.Components.StiComponent = parentReport.GetComponentByName(e.SubReportName)
If comp Is Nothing Then
Exit Sub
End If
Dim dataBand As Stimulsoft.Report.Components.StiDataBand = comp.GetDataBand()
If dataBand Is Nothing Then
'This subreport is not on an databand. Just display it.
Else
'Databand found.
Dim data As Stimulsoft.Report.Dictionary.StiDataSource
data = parentReport.Dictionary.DataSources(dataBand.DataSourceName)
If data Is Nothing Then
Exit Sub
End If
Dim value As Object = data("CODE")
If value Is Nothing Then
Exit Sub
End If
Debug.WriteLine(data.Position & " ->" & value.ToString)
End If
Thanks.