filmov
tv
How to Add Where Clause in RDLC Report In VB Source Code | ProgrammingGeek

Показать описание
If you want to add where clause in RDLC report this tutorial is for you. This tutorial teach you how to add where clause in RDLC report in windows form application using VB.Net. The data in RDLC report will be extracted from SQL server database to RDLC report using visual studio code.
This tutorial also covers
- how to add where clause in RDLC report
- how to declare a variable in windows form application using vb
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim sex As String = ""
If RadioButton1.Checked = True Then
sex = "Male"
Else
sex = "Female"
End If
Dim con As New SqlConnection("Data Source=aaaaaaaaaaa129")
Dim com As New SqlCommand("Select * from UserInfo_Tab where Sex ='" & sex & "'", con)
Dim sd As New SqlDataAdapter(com)
Dim dt As New DataTable
sd.Fill(dt)
With Me.ReportViewer1.LocalReport
.DataSources.Clear()
.DataSources.Add(New ReportDataSource("DataSet1", dt))
End With
Me.ReportViewer1.RefreshReport()
End Sub
------
This channel covers all the programming tutorial related with .Net- C#, linq, VB, SQL, Android, HTML, CSS, jQuery, Crystal Report and Microsoft Report.
So, Please subscribe and keep in touch.
Visit my page in Facebook
------
#HowToAddWhereClauseInRDLCReportInVB #WhereClauseInRDLCReportInVB #RDLCReportInC#WithSQL
This tutorial also covers
- how to add where clause in RDLC report
- how to declare a variable in windows form application using vb
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim sex As String = ""
If RadioButton1.Checked = True Then
sex = "Male"
Else
sex = "Female"
End If
Dim con As New SqlConnection("Data Source=aaaaaaaaaaa129")
Dim com As New SqlCommand("Select * from UserInfo_Tab where Sex ='" & sex & "'", con)
Dim sd As New SqlDataAdapter(com)
Dim dt As New DataTable
sd.Fill(dt)
With Me.ReportViewer1.LocalReport
.DataSources.Clear()
.DataSources.Add(New ReportDataSource("DataSet1", dt))
End With
Me.ReportViewer1.RefreshReport()
End Sub
------
This channel covers all the programming tutorial related with .Net- C#, linq, VB, SQL, Android, HTML, CSS, jQuery, Crystal Report and Microsoft Report.
So, Please subscribe and keep in touch.
Visit my page in Facebook
------
#HowToAddWhereClauseInRDLCReportInVB #WhereClauseInRDLCReportInVB #RDLCReportInC#WithSQL
Комментарии