SSRS Local Mode - Sub Report RRS feed

  • Question

  • I've written an ASP.NET SSRS Report and Subreport and it is working fine when running from Visual Studio 2013 - but after I publish it - the sub report is not showing and no error is being shown. The main report shows. Not sure what I should look at to find out why the sub report is not displaying.

    Me.ReportViewer1.ProcessingMode = WebForms.ProcessingMode.Local
                    Me.ReportViewer1.LocalReport.ReportPath = Server.MapPath("rUpdateNewAccounts.rdlc")
                    AddHandler ReportViewer1.LocalReport.SubreportProcessing, AddressOf ReportViewer1_SubreportProcessing
                    Dim dsInfo As DataSet1 = FetchInfo()
                    Dim objRDS As New Microsoft.Reporting.WebForms.ReportDataSource("DataSet1", dsInfo.Tables(0))
                    Dim objRP1 As Microsoft.Reporting.WebForms.ReportParameter = New WebForms.ReportParameter("Title", strTitle)
                    Dim objRP2 As Microsoft.Reporting.WebForms.ReportParameter = New WebForms.ReportParameter("SubTitle", strSubTitle)
                    Me.ReportViewer1.LocalReport.SetParameters(New Microsoft.Reporting.WebForms.ReportParameter() {objRP1, objRP2})

    Public Sub ReportViewer1_SubreportProcessing(ByVal sender As Object, ByVal e As SubreportProcessingEventArgs)
                Dim objCN As Data.SqlClient.SqlConnection = New SqlClient.SqlConnection(ConfigurationManager.ConnectionStrings("DefaultConnection").ConnectionString.ToString)
                Dim objDA As Data.SqlClient.SqlDataAdapter = New SqlClient.SqlDataAdapter
                Dim objCM As Data.SqlClient.SqlCommand = New SqlClient.SqlCommand("stpGet_User_Audit_Information", objCN)
                Dim objDS As New DataSet
                objCM.CommandType = CommandType.StoredProcedure
                objCM.Parameters.AddWithValue("@Id", e.Parameters(0).Values(0).ToString)
                objDA = New SqlClient.SqlDataAdapter(objCM)

                e.DataSources.Add(New ReportDataSource("DataSet2", objDS.Tables(0)))
            Catch ex As Exception
            End Try
        End Sub

    Sunday, December 4, 2016 9:48 PM