Loading

Wednesday, April 7, 2010

How to View Crystal Report In Visual Basic 6


This sample code view the crystal report file (Employee.rpt) , please don't forget to add the Crystal Report Component or you got an error.

Private Sub cmdEmployee_Click()
On Error GoTo errHandler
    If Right(App.Path, 1) = "\" Then
        rep1.ReportFileName = App.Path + "Employee.rpt"
    Else
        rep1.ReportFileName = App.Path + "\" + "Employee.rpt"
    End If
    rep1.Action = 1
    Exit Sub
errHandler:
    MsgBox Str(Err.Number) + " " + Err.Description
End Sub

SHARE TWEET

Thank you for reading this article How to View Crystal Report In Visual Basic 6 With URL https://x-tutorials.blogspot.com/2010/04/how-to-view-crystal-report-in-visual.html. Also a time to read the other articles.

0 comments:

Write your comment for this article How to View Crystal Report In Visual Basic 6 above!