Click here to Skip to main content
15,893,668 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
VB
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    Dim cryRpt As New ReportDocument
    RepLocation = Path.GetFullPath( _
        Path.Combine(Application.StartupPath, "..\..")) & _
        "\CrystalReport1.rpt"
    cryRpt.Load(RepLocation)
    If TextBox1.Text <> "" Then
        cryRpt.RecordSelectionFormula = "{QC.NAME} = " & TextBox1.Text
    End If
    CrystalReportViewer1.ReportSource = cryRpt
    CrystalReportViewer1.Refresh()
End Sub
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900