I am using ReportViewer software, Some of you have been able to create complex reports, where there are structures of parents, children and grandchildren.
Private Sub Reporte_SubreportProcessing(ByVal sender As Object, ByVal e As Microsoft.Reporting.WinForms.SubreportProcessingEventArgs) Handles Reporte.SubreportProcessing
Select Case e.ReportPath
Case "rptBORastreoAutorizaciones"
For Each _Vehiculo As RastreoVehiculo In m_Rastreo.RastreoVehiculos
e.DataSources.Add(New ReportDataSource("YMS_Libreria_Reporte_Rastreo_RastreoVehiculoAutorizacion", _
_Vehiculo.Autorizaciones))
For Each _Autorizacion As RastreoVehiculoAutorizacion In _Vehiculo.Autorizaciones
e.DataSources.Add(New ReportDataSource("YMS_Libreria_Reporte_Rastreo_RastreoVehiculoAutorizacionSecuencia", _
_Autorizacion.Secuencias))
Next
Next
Case "rptBORastreoSecuencias"
For Each _Vehiculo As RastreoVehiculo In m_Rastreo.RastreoVehiculos
For Each _Autorizacion As RastreoVehiculoAutorizacion In _Vehiculo.Autorizaciones
e.DataSources.Add(New ReportDataSource("YMS_Libreria_Reporte_Rastreo_RastreoVehiculoAutorizacionSecuencia", _
_Autorizacion.Secuencias))
Next
Next
End Select
End Sub
I have the following structure of objects:
Parent BO
Child A
Child B
Child C
Child D
Child D1
Child D1.1
Child D1.2
Child D2
Child D2.1
Child D2.2