Code : Imports CrystalDecisions.CrystalReports.Engine Imports CrystalDecisions.Shared Public Class Form6 Inherits System.Windows.Forms.Form Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim cryRpt As New ReportDocument cryRpt.Load(Application.StartupPath \CrystalReport5.rpt") CrystalReportViewer1.ReportSource = cryRpt CrystalReportViewer1.Refresh() Dim cryRpt As New ReportDocument cryRpt.Load(Application.StartupPath \CrystalReport5.rpt") Dim crParameterFieldDefinitions As ParameterFieldDefinitions Dim crParameterFieldDefinition As ParameterFieldDefinition Dim crParameterValues As New ParameterValues Dim crParameterDiscreteValue As New ParameterDiscreteValue crParameterDiscreteValue.Value = TextBox1.Text crParameterFieldDefinitions = cryRpt.DataDefinition.ParameterFields crParameterFieldDefinition = crParameterFieldDefinitions.Item crParameterValues = crParameterFieldDefinition.CurrentValues crParameterValues.Clear() crParameterValues.Add(crParameterDiscreteValue) crParameterFieldDefinition.ApplyCurrentValues(crParameterValues) CrystalReportViewer1.ReportSource = cryRpt CrystalReportViewer1.Refresh() cryRpt.RecordSelectionFormula = {Button1}= TextBox1.Text End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)