Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

rdlc Report and Parameters

Status
Not open for further replies.

dvannoy

MIS
May 4, 2001
2,765
0
0
US
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

 
are the values of t1.text and t2.text valid datetime values?
did you check to see if your query actually returns data and fills your dataset?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top