locked
subreport, vb.net VS 2010

    Question

  • I'm using VB.NET in VS 2010 environment.

    I have created a working report, included a sub-report that is linked to another RDLC file in the same project.

    The sub report fails to load with :  Data retrieval failed for the subreport, 'Subreport1', located at: WML_WS.MediaCur.rdlc. Please check the log files for more information.


    My question is, where are the 'log files'

    I have the following code:

    ublic Class frmProofSheet
        Public Property Caption() As String
        Public Property BookingNo() As String
        Property MediaSysID As Integer = 0

        Private Sub frmProofSheet1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            Me.WMLDataSet.EnforceConstraints = False
            Me.MasterCatalogExpandedTableAdapter.Fill(Me.WMLDataSet.MasterCatalogExpanded, BookingNo)
            '
            Dim q As New WMLDataSetTableAdapters.QueriesTableAdapter
            '
            If q.GetMediaSysID(BookingNo) <> Nothing Then
                MediaSysID = q.GetMediaSysID(BookingNo)
            End If
            Me.MediaCurriculumsTableAdapter.Fill(Me.WMLDataSet.MediaCurriculums, MediaSysID)
            '
            'show banners
            '
            Dim BannerTop As New Microsoft.Reporting.WinForms.ReportParameter("BannerTop", My.Settings.WMLLicShort & " - " & Caption)
            Dim BannerBottom As New Microsoft.Reporting.WinForms.ReportParameter("BannerBottom", "WML - " & My.Settings.WMLLicLong)
            '
            Me.ReportViewer1.LocalReport.SetParameters(New Microsoft.Reporting.WinForms.ReportParameter() {BannerTop})
            Me.ReportViewer1.LocalReport.SetParameters(New Microsoft.Reporting.WinForms.ReportParameter() {BannerBottom})
            '
            Me.ReportViewer1.RefreshReport()
        End Sub

        Private Sub SubRep1data(ByVal sender As Object, ByVal e As SubreportProcessingEventArgs)
            e.DataSources.Add(New ReportDataSource("DataSet2_MediaCurriculums", Me.MediaCurriculumsBindingSource))
        End Sub

     

    Wednesday, February 16, 2011 8:38 PM

Answers

  • OK, I solved this one.

    2 issues, in the code the SubRep1data was missing the 'handles' clause, and the datasource name needed to be a simple "DataSet2"

    I wish that this was better documented, but, since the issue is dead, I might as well leave enough clues here for the next dude to stumble into the bowels of the subreport

    • Marked as answer by David Len Wednesday, February 16, 2011 10:02 PM
    Wednesday, February 16, 2011 10:02 PM

All replies

  • OK, I solved this one.

    2 issues, in the code the SubRep1data was missing the 'handles' clause, and the datasource name needed to be a simple "DataSet2"

    I wish that this was better documented, but, since the issue is dead, I might as well leave enough clues here for the next dude to stumble into the bowels of the subreport

    • Marked as answer by David Len Wednesday, February 16, 2011 10:02 PM
    Wednesday, February 16, 2011 10:02 PM
  • Hello David,

    Thanks for your post.

    Glad to see this problem has been solved and thanks for your sharing. This will be benetifical to other community members. If you need further assistance, please feel free to follow up.

    Have a nice day.

    Best regards


    Liliane Teng [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, February 17, 2011 6:35 AM
  • "OK, I solved this one."

    How did you solve it?

    Alex Kahn

    Friday, October 07, 2011 6:30 PM