Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello friends I am Using Visual Studio2010 I have a form named as Form1.vb in which there is a Textbox txtId .I want that my report viewer should only display the records of only that Id that is on the Form1.txtId.Text.
My report viewer is showing records of all the Id's in the Database.
Please help me :(
ThankYou In Advance
Posted
Comments
RossMW 24-Feb-15 15:17pm    
It unclear about the details of the report viewer, however, the report viewer will need to be able to run with the passed value from Txtid. To update the report viewer you will need an event (button command or Txtid event) to run the report viewer passing the Txtid value.

1 solution

Dim p(0) As ReportParameter
p(0) = New ReportParameter(param, txtId.Text)
ReportViewer1.LocalReport.SetParameters(p)
ReportViewer1.DataBind()
ReportViewer1.LocalReport.Refresh()
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900