I am trying to make a report which gets its data from a windows form's textboxes. My code works fine but upon display of the report, a window always appear asking to enter parameter values. How can I bypass or remove this window? Here is my code:
Dim report As rptVoucherReceipt = New rptVoucherReceipt
Dim crParameterDiscreteValue As ParameterDiscreteValue
Dim crParameterFieldDefinitions As ParameterFieldDefinitions
Dim crParameterFieldLocation As ParameterFieldDefinition
Dim crParameterValues As ParameterValues
crParameterFieldDefinitions = report.DataDefinition.ParameterFields
crParameterFieldLocation = crParameterFieldDefinitions.Item("parAmtWords")
crParameterValues = crParameterFieldLocation.CurrentValues
crParameterDiscreteValue = New CrystalDecisions.Shared.ParameterDiscreteValue
crParameterDiscreteValue.Value = frmPremPay.txtAmtWords.Text
crParameterValues.Add(crParameterDiscreteValue)
crParameterFieldLocation.ApplyCurrentValues(crParameterValues)
crParameterFieldLocation = crParameterFieldDefinitions.Item("parPayAmt")
crParameterValues = crParameterFieldLocation.CurrentValues
crParameterDiscreteValue = New CrystalDecisions.Shared.ParameterDiscreteValue
crParameterDiscreteValue.Value = frmPremPay.txtPremPayPayAmt.Text
crParameterValues.Add(crParameterDiscreteValue)
crParameterFieldLocation.ApplyCurrentValues(crParameterValues)
CrystalReportViewer1.ReportSource = report