Private Function MontoringInfo1() As IMS Try Dim objConn As SqlConnection = New SqlConnection(strConn) objConn.Open() Dim objComm As SqlCommand = New SqlCommand() objComm.CommandText = "SELECT Division,District,Upazila ,Total_form,Received_form,Booth_no,Receving_date,Remarks from Table1 WHERE Upazila = '" & ListBox1. selecteditem & "'" objComm.Connection = objConn objComm.CommandType = CommandType.Text Dim da As SqlDataAdapter = New SqlDataAdapter(objComm) Dim ds As IMS = New IMS() da.Fill(ds, "PMT_Application") Return ds Catch ex As SqlException MsgBox(ex.Message, MsgBoxStyle.OkOnly, "Error") Return Nothing End Try End Function Private Sub btnPrintview_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrintview.Click Dim cry As ReportClass = New Data_main cry.SetDataSource(MontoringInfo1()) Dim rc As New Reportviewer(cry) rc.ShowDialog() End Sub
For i = 0 To ListBox1.Items.Count - 1 If ListBox1.Items(i).selected Then End if Next
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)