How to send value from frontend to report in VB.Net
Actually I have a form in VB.Net and there is a textbox. Now i want to send the textbox value to Crystal Report. How can i do this? Please help
You have to use a parameter fields of Crystal report for this....
1.Open
Field Explorer window in Crystal report.
2.Go to
Parameter Fields.
3.Right click on Parameter Fields-------->Click on
New..
4.In the pop-up window give a
Name for your parameter and give its
Data Type.say its Name is
mytextBoxValue and Data Type is
String.
5.A parameter field[mytextBoxValue ] will be added under Parameter Fields...Drag this field to your report and place where you want to show your textbox value.
6.Now in the code behind file write the following code to pass your TextBox value to this Crystal report parameter field.
-
-
Dim txtValue As String=TextBox1.Text
-
Dim myReport As New CrystalReport1
-
myReport .SetParameterValue("mytextBoxValue", txtValue )
-