tell me about Crystal Report about Text Fields

mohsinjk

Member
Joined
Aug 1, 2007
Messages
11
Programming Experience
1-3
Hello dears

i use Visual Studio 2005 and its Crystal Report,
My problem is, I want to use Text field as a numeric variable in
crystal report formula.


if u know please tell me how do this.
 
Crystal Report???

Hello dears

i use Visual Studio 2005 and its Crystal Report,
My problem is, I want to use Text field as a numeric variable in
crystal report formula.

if u know please tell me how do this.
 
you need to be more specific.

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)
 
Back
Top