i created a data set manually and created a datatable pricelist. The reportviewr is in a usercontrol ucReport, which is loaded inside a panel at run tyime
i have created the report i want to bound its data to by doing this
Dim oRpt As New ucReport
Dim ds As DataSet = GetDataset("prices") Dim rds As ReportDataSource = New ReportDataSource("ReportDataSet", ds.Tables(0)) With oRpt.rvMain.LocalReport .ReportPath = "Reports\pricelist.rdlc" .DataSources.Clear() .DataSources.Add(rds) .Refresh() End With
ths getdata source looks like
Private Function GetDataset(ByVal sName As String) As DataSet Dim conn As New SQLiteConnection("Data Source=" & dbPath) conn.Open() Dim sql As String = Nothing Select Case sName.ToLower Case "prices" sql = "Select * FROM prices_view" End Select Dim ad As SQLiteDataAdapter = New SQLiteDataAdapter(sql, conn) Dim ds As DataSet = New DataSet ad.Fill(ds) Return ds End Function
When i run the report, i don't get anything in the report viewer
Do you know we will see our dead loved ones again? John 5:25