I'm currently working on a project on VB.NET and I'm getting this error below.

Error 2 Overload resolution failed because no accessible 'New' is most specific for these arguments:
'Public Sub New(name As String, dataSourceValue As System.Collections.IEnumerable)': Not most specific.
'Public Sub New(name As String, dataSourceValue As System.Data.DataTable)': Not most specific. C:\Users\user\Desktop\POS\GUI\MainWindow.vb 279 17 POS

below here is the code which actually the errors takes.

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.
            RV.LocalReport.DataSources.Add(RDS)
            RV.LocalReport.ReportEmbeddedResource = "POS.TotalProfitForAllTime.rdlc"
            RV.RefreshReport()

Helping to solve this issue is greatly appericiated (:

Recommended Answers

All 3 Replies

how is tmpds declared? is totalprofitforalltime a datatable or an ienumerable collection? If not then you'll get that error.

Same problem. could not find the solution, so i went back installing vs2008 where this problem is not exisintg. it is there with vs2010....but does anyone has the solution for 2010?

how is tmpds declared? is totalprofitforalltime a datatable or an ienumerable collection? If not then you'll get that error.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.