none
Microsoft.Reporting.WinForms.ReportDataSource Error BC30521 RRS feed

  • Question

  • HI Iam trying to convert a VS2008 project to a VS2015 Project and all is well except for an erro I get when I try to use the below code

    If cbReportSelect.Text = "Total profit for all time" Then
    
                ' fill the information for that report
                Dim TA As New POSDSTableAdapters.TotalProfitForAllTimeTableAdapter
                Dim TmpDS As New POSDS
                TA.Fill(TmpDS.TotalProfitForAllTime)
    
                ' clear previous DS
                rvwReport.LocalReport.DataSources.Clear()
    
                ' create new DS
                Dim RDS As New Microsoft.Reporting.WinForms.ReportDataSource("POSDS_TotalProfitForAllTime", TmpDS.TotalProfitForAllTime)
    
                ' tell the report control to use the DS, and 
                ' use the report template created by us.
                rvwReport.LocalReport.DataSources.Add(RDS)
                rvwReport.LocalReport.ReportEmbeddedResource = "POS.TotalProfitForAllTime.rdlc"
                rvwReport.RefreshReport()

    I am getting an overload resolution failure on the line below. ReportDataSource is passed the name as a string and the datasource but it can't work out which overload of the function to use.

    Dim RDS As New Microsoft.Reporting.WinForms.ReportDataSource("POSDS_TotalProfitForAllTime", TmpDS.TotalProfitForAllTime)

    any help would appreciated

    Monday, June 8, 2015 12:03 AM

All replies

  • try this resolution... error: change Dim RDS As New Microsoft.Reporting.WinForms.ReportDataSource("TotalProfitForAllTimeDataSet",TmpDS.TotalProfitForAllTime) into Dim RDS As New Microsoft.Reporting.WinForms.ReportDataSource             RDS.Name = "TotalProfitForAllTimeDataSet"             RDS.Value = TmpDS.TotalProfitForAllTime

    from stef turelinckx

    Friday, August 21, 2015 3:26 AM