Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

rdlc Report and Parameters

rdlc Report and Parameters

rdlc Report and Parameters

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

RE: rdlc Report and Parameters

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?

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close