Are you saying that on your form, you have a textbox that contains a "value". You then want to use this "value" to set as the parameter in your Crystal report?
If so - do you know how to add a parameter within the report?
You then code a button or something that says:
VB.NET:
Dim rpt As New my_report
rpt.SetDataSource(my_dataset)
rpt.SetParameterValue("my_parameter_name", my_textbox.text)
Me.CrystalReportViewer1.ReportSource = rpt
replacing the my_XYZ with the name of your objects. The line;
rpt.SetParameterValue("my_parameter_name", my_textbox.text)
is the line that tells the report the value of the parameter, so if your parameter in your report is called CustomerID, and your textbox was txtCustID it will be;
rpt.SetParameterValue("CustomerID", txtCustID.text)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.