Access 2010 / Crystal 8.5 Viewing or opening problems (1 Viewer)

Minty

AWF VIP
Local time
Today, 14:13
Joined
Jul 26, 2013
Messages
10,354
I've recently converted a 2003 mdb to 2010 accdb which has been relatively painless. However I'm struggling to make the crystal active x viewer work.

The code crashes out at the yellow line with an Run Time error "Invalid TLV record"

A fair bit of gogling and a long look on here hasn't helped, .
Code:
 'Crystal objects
    Dim CRapp As CRAXDRT.Application
    Dim CRrep As CRAXDRT.Report
    
    'On Error GoTo ErrorHandler
    
    'Screen.MousePointer = 11 'Hourglass
    
    'open local table amd retrieve the repart details
    Set db = CurrentDb()
    sSQL = "SELECT rptPath, rptReportName, rptSelectionFormula FROM tblRptViewer"
    Set rs = db.OpenRecordset(sSQL, dbOpenDynaset)
        rs.MoveFirst
        sRptPath = rs.Fields("rptPath")
        sRptName = rs.Fields("rptReportName")
        sSlctnFrmla = rs.Fields("rptSelectionFormula")
    rs.Close
    Set rs = Nothing
    Set db = Nothing

    'set cr viewer sizes
    CRwidth = 22
    CRheight = 12
    Me.txtCRsize_W = CRwidth
    Me.txtCRsize_H = CRheight
    
    'Run the report
    Set CRapp = New CRAXDRT.Application
    Set CRrep = New CRAXDRT.Report
    
    Debug.Print (sRptPath & "\" & sRptName)
   [COLOR="Yellow"] Set CRrep = CRapp.OpenReport(sRptPath & "\" & sRptName)[/COLOR]
    CR_View.ReportSource = CRrep
    CR_View.ViewReport
Any suggestions, I'm sure it's a reference / method problem, but the code works fine on the old mdb.
 

kevlray

Registered User.
Local time
Today, 07:13
Joined
Apr 5, 2010
Messages
1,046
Not sure you can use CR 8.5 tools with Access 2007+ unless you use an ODBC or OLE connection for the data source in the report. Even CR 2011 does not have a connector for Access 2007+, you have to use ODBC or OLE as a datasource.
 

Minty

AWF VIP
Local time
Today, 14:13
Joined
Jul 26, 2013
Messages
10,354
I got stuck, so recreated the report in access, solved a multitude of other issues in the process , but thanks for the assistance.
 

Users who are viewing this thread

Top Bottom