I have a report viewer that pulls data from a sql sp. I'm trying to use parameters within my sp to show the results on mt report viewer. I get no error when running the below code but the report viewer will not display data.
any help would be appreciated
Dim cmd As New SqlCommand("sp_name")
Using con As New SqlConnection(strcn)
Using sda As New SqlDataAdapter()
cmd.Connection = con
cmd.CommandType = CommandType.StoredProcedure
cmd.Parameters.Add("@StartingDate", SqlDbType.DateTime).Value = t1.Text
cmd.Parameters.Add("@EndingDate", SqlDbType.DateTime).Value = t2.Text
sda.SelectCommand = cmd
Using dsR As New sp_ops()
sda.Fill(dsR, "dt_name")
Return dsR
End Using
End Using
End Using
any help would be appreciated
Dim cmd As New SqlCommand("sp_name")
Using con As New SqlConnection(strcn)
Using sda As New SqlDataAdapter()
cmd.Connection = con
cmd.CommandType = CommandType.StoredProcedure
cmd.Parameters.Add("@StartingDate", SqlDbType.DateTime).Value = t1.Text
cmd.Parameters.Add("@EndingDate", SqlDbType.DateTime).Value = t2.Text
sda.SelectCommand = cmd
Using dsR As New sp_ops()
sda.Fill(dsR, "dt_name")
Return dsR
End Using
End Using
End Using