Imports CrystalDecisions.CrystalReports.Engine Imports CrystalDecisions.Shared Public Class RptParameter Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim cryRpt As New RptCrpara cryRpt.Load("rptcrpara.rpt") Dim crParameterFieldDefinitions As ParameterFieldDefinitions Dim crParameterFieldDefinition As ParameterFieldDefinition Dim crParameterValues As New ParameterValues Dim rvalue As New CrystalDecisions.Shared.ParameterDiscreteValue Dim rupee As String = "Rupees" rvalue.Value = rupee Dim crtextval1 As New ParameterDiscreteValue crtextval1.Value = Val(TextBox1.Text) crParameterFieldDefinitions = cryRpt.DataDefinition.ParameterFields() crParameterFieldDefinition = _ crParameterFieldDefinitions.Item("docno") crParameterValues = crParameterFieldDefinition.CurrentValues crParameterValues.Clear() crParameterValues.Add(crtextval1) crParameterFieldDefinition.ApplyCurrentValues(crParameterValues) CrystalReportViewer1.ReportSource = cryRpt CrystalReportViewer1.Refresh() End Sub End Class
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)