Visual Basic Sample code on how to call and filter crystal report in Visual Basic 2010 using the Record Selection Formula. Download Project
Visual Basic Source Code
Visual Basic Source Code
Imports CrystalDecisions.CrystalReports.Engine
Imports System.IO
Public Class Form1
Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim cryReport As New ReportDocument
RepLocation = Path.GetFullPath( _
Path.Combine(Application.StartupPath, "..\..")) & _
"\CrystalReport1.rpt"
cryReport.Load(RepLocation)
If TextBox1.Text <> "" Then
cryReport.RecordSelectionFormula = "{Customer.CustomerID} = " & TextBox1.Text
End If
CrystalReportViewer1.ReportSource = cryReport
CrystalReportViewer1.Refresh()
End Sub
End Class
Update Contact :
No Wa/Telepon (puat) : 085267792168
No Wa/Telepon (fajar) : 085369237896
Email : Fajarudinsidik@gmail.com
No Wa/Telepon (puat) : 085267792168
No Wa/Telepon (fajar) : 085369237896
Email: Fajarudinsidik@gmail.com
atau Kirimkan Private messanger melalui email dengan klik tombol order dibawah ini :