Using external report as a subreport.

Stimulsoft Reports.NET discussion
Pilgrim
Posts: 29
Joined: Fri Aug 03, 2007 7:57 am
Location: Cape Town

Using external report as a subreport.

Post by Pilgrim »

Hi Guys.

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
The data.position stays at 0. Any idea what is going on?

Thanks.
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Using external report as a subreport.

Post by Vital »

Hello,

Please check patch from 27 Oct (when it will be available). This patch fix some problems with subreports.

Thank you.
Post Reply