SkyVValker 4 Light Poster

I am using crystal reports 8, and visual basic 6

I have a crystal report viewer, with its commands set up as a function. This way the different aspects of the program use the same viewer, so no two reports are viewed at the same time.

But after i open the first report, every report opened after that gives me a Memory Full error. It doenst close the program or anything, but will not show anythin in the area. I have to click one of the arrows to have the new report shown. I have tried refresh & a number of other things, nothing will close down the previous crystal report or viewer....

Any suggestions?

Private Sub Showrpt(rptpath As String)

    Dim crApp As CRAXDRT.Application
    Dim Report As CRAXDRT.Report
    Dim strSelectionfrm As String
    Set crApp = New CRAXDRT.Application
    Set Report = crApp.OpenReport("studfeerepkps.rpt", 1)

    '=========================================

    strSelectionfrm = "{TBLFEE.grno}=" & Me.txtGRNo.Text

    Report.RecordSelectionFormula = strSelectionfrm
    Report.DiscardSavedData
    Me.CRV.ReportSource = Report

    CRV.DisplayTabs = False
    CRV.EnableSelectExpertButton = False
    CRV.EnableDrillDown = False
    CRV.EnableGroupTree = False
    CRV.EnableAnimationCtrl = False
    CRV.DisplayTabs = False
    CRV.EnableSelectExpertButton = False
    CRV.EnableDrillDown = False
    CRV.EnableGroupTree = False
    CRV.EnableAnimationCtrl = False

    Me.CRV.ViewReport

    Set crApp = Nothing
    Set Report = Nothing



End Sub
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.