RDLC Report - Subreport unable to execute subreport process event RRS feed

  • Question

  • good day!!!

    I am developing a program using visual basic 2010 and i've got a problem with my subreport event process.

    I have 2 reports created, one for main report and other for subreport.

    For my main report i added a subreport control, and two fields (textboxes). i added the subreport control parameter with "EntryID", and for my subreport i added two fields(textboxes).

    The problem was when I added a parameters to my subreport control in the main report, the subreport event did not execute or run and there was no record display in subreport area. but when i remove the parameters to my subreport control in my main report it execute properly. How can I fixed this problem with a parameters passes to subreport?

    here is my code:

    'report viewer form Load event

    rView.LocalReport.ReportPath = "MainReport.rdlc"

    Dim ds As New PayrollSystem.DataSet1
    Dim da As New PayrollSystem.DataSet1TableAdapters.MainTableTableAdapter

    AddHandler rView.LocalReport.SubreportProcessing, AddressOf SubreportProcessingEvent

    da.Fill(ds.MainTable, 12)
    rptDataSource = New ReportDataSource("DataSet1", ds.Tables("MainTable"))

    'event handler
    Sub SubreportProcessingEvent(ByVal sender As Object, ByVal e As SubreportProcessingEventArgs)
            Dim ds As New MyProg.ds_SubReport
            Dim da As New MyProg.ds_SubReportTableAdapters.tbl_SubReportTableAdapter
            da.Fill(ds.tbl_SubReport, 29)
            e.DataSources.Add(New ReportDataSource("ds_SubReport", ds.Tables("tbl_SubReport")))
    End Sub

    Wednesday, September 9, 2015 1:44 AM