A1VBCode Forums

how to pass dataset values to ReportViewer run time


http://www.a1vbcode.com/vbforums/Topic32264.aspx

By makis_best - 3/8/2015

Hi



I am new to reports so....

I want to show all my data from my sql table in ReportViewer run time.

Can someone tell my what I have to do?



I have this code already





Dim SQLCode, TableName As String

Dim sDs as DataSet

TableName = "CashTable"

SQLCode = "SELECT Date, Name, NetValue FROM " & TableName

SqlConnectionModule.ConnectToSql("Server", "UserName", "Password", "Database", SQLCode, TableName)

ReportViewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Local

ReportViewer1.LocalReport.ReportPath = System.Environment.CurrentDirectory & "\tameio.rdlc"

ReportViewer1.LocalReport.DataSources.Clear()

ReportViewer1.LocalReport.DataSources.Add(New Microsoft.Reporting.WinForms.ReportDataSource(TableName, sDs.Tables(TableName)))

ReportViewer1.RefreshReport()





what I have to do next so all my records from sql query show in my report?



I have to do something in my report?