By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,661 Members | 781 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,661 IT Pros & Developers. It's quick & easy.

Rcdl Report using dataset not displaying report.

P: 25
Expand|Select|Wrap|Line Numbers
  1. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  2.     Dim ds as DataSet
  3.     Dim rep As LocalReport = ReportViewer1.LocalReport
  4.     rep.ReportPath = "F:\My Work\VB\Report\Report3.rdlc"
  5.     ds = obj.GetRecords("SELECT * from kar", "Kar")
  6.     Dim RDS As New ReportDataSource()
  7.     RDS.Name = ds.Tables("Kars")
  8.     RDS.Value = ds.Tables("Kar")
  9.     rep.DataSources.Add(RDS)
  10. End Sub
  12. Public Function GetRecords(ByVal sql As String, ByVal tblName As String) As DataSet
  13.         ds = New DataSet()
  14.         da = New SqlDataAdapter(sql, cn)
  15.         da.Fill(ds, tblName)
  16.         Return ds
  17. End Function
May 10 '16 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.