"select * from table_name where field1 = "abc" and field2 = "def"
Imports CrystalDecisions.CrystalReports.EngineImports CrystalDecisions.Shared
Dim ParamFields As ParameterFields = Me.CrystalReportViewer1.ParameterFieldInfo'declare two parameterfields Dim P_txt1 As New ParameterField 'to hold the textbox value Dim P_txt2 As New ParameterField 'to hold the label value 'setting the variables to the ones declared in the report queryP_txt1.Name = "@txt1"P_txt2.Name = "@txt2" Dim P_txt1_Value As New ParameterDiscreteValueDim P_txt2_Value As New ParameterDiscreteValue'Form1 is the name of the form that holds the lablel and buttonP_txt1_Value.Value = Form1.label1.text P_txt2_Value.Value = Form1.textbox1.text P_txt1.CurrentValues.Add(P_txt1_Value) P_txt2.CurrentValues.Add(P_txt2_Value)ParamFields.Add(P_txt1)ParamFields.Add(P_txt2)