【发布时间】:2016-08-20 15:26:48
【问题描述】:
我正在编写 POS 代码,但在尝试查看 access 数据库中的特定数据时遇到了问题。每次我尝试都会收到此错误:
错误 1 重载解析失败,因为没有可访问的“新”最适合这些参数:
'Public Sub New(name As String, dataSourceValue As System.Collections.IEnumerable)':不是最具体的。
'Public Sub New(name As String, dataSourceValue As System.Data.DataTable)': 不是最具体的。
C:\Users\EMIL\Documents\Visual Studio 2010\Projects\P.O.S\FrmMain.vb 402 17 AdvanceLoginForm
谁能告诉我我的代码有什么问题
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
If ComboBox1.Text = "Total Profit for all time" Then
Dim TA As New POSDSTableAdapters.TotalProfitForAllTimeTableAdapter
Dim TmpDS As New POSDS
TA.Fill(TmpDS.TotalProfitForAllTime)
'clear previous datasource
RV.LocalReport.DataSources.Clear()
'create new datasource
Dim RDS As New Microsoft.Reporting.WinForms.ReportDataSource("POSDS_TotalProfitForAllTime.rdlc", TmpDS.TotalProfitForAllTime)
RV.LocalReport.DataSources.Add(RDS)
RV.LocalReport.ReportEmbeddedResource = "POS.TotalProfitForAllTime.rdlc"
RV.RefreshReport()
ElseIf ComboBox1.Text = "Total Profit between two dates" Then
Dim TA As New POSDSTableAdapters.TotalProfitForAllTimeTableAdapter
Dim TmpDS As New POSDS
TA.FillByFilteringBetweenTwoDates(TmpDS.TotalProfitForAllTime, DateTimePicker1.Value, DateTimePicker2.Value)
'clear previous datasource
RV.LocalReport.DataSources.Clear()
'create new datasource
Dim RDS As New Microsoft.Reporting.WinForms.ReportDataSource("POSDS_TotalProfitForAllTime.rdlc", TmpDS.TotalProfitForAllTime)
RV.LocalReport.DataSources.Add(RDS)
RV.LocalReport.ReportEmbeddedResource = "POS.TotalProfitBetweenTwoDates.rdlc"
RV.RefreshReport()
End If
End sub
错误在:
Dim RDS As New Microsoft.Reporting.WinForms.ReportDataSource("POSDS_TotalProfitForAllTime.rdlc", TmpDS.TotalProfitForAllTime)
【问题讨论】:
标签: vb.net