-2147206429 (80043ae3) Invalid TLV Record 
Author Message
 -2147206429 (80043ae3) Invalid TLV Record

I want to be able to keep my reports external to
my application (in .rpt format) but view the
reports using the Smart Viewer (CRViewer).  This works fine on my own
computer, but it does not work on my managers computer.  We both have
Crystal Reports 8.5 installed on our machines.

I've tried the following code;

Private Sub cmdViewReport_Click()
    Dim ldtmReportDate As Date
    ldtmReportDate = Now()

    Load frmReportViewer

    frmReportViewer.LoadReport "ftr.rpt"


    frmReportViewer.DisplayReport

    frmReportViewer.Show vbModal, Me

End Sub
---------------------------------------------
frmReportViewer code:
---------------------------------------------
' To use this form
'
' 1) load the form
' Load(frmReportViewer)
'
' 2) define type of form to load
' frmReportViewer.SetReport "ReportA001Clin"
'
' 3) define parameters
' frmReportViewer.SetParameter "TIStatus", 4
' frmReportViewer.SetParameter "BeginDate", #5/28/2001#
'
' 4) display report
' frmReportViewer.DisplayReport
'
Dim mobjReport As Report

Private Sub Form_Load()
    Screen.MousePointer = vbHourglass
    CRViewer1.Top = 0
    CRViewer1.Left = 0
    CRViewer1.Height = ScaleHeight
    CRViewer1.Width = ScaleWidth
    CRViewer1.Zoom 100
    CRViewer1.EnableExportButton = True
End Sub

Public Sub LoadReport(ByRef pstrFileName As Variant)

    Dim lobjApp As CRAXDRT.Application
    Dim lstrLocation As String
    Dim llngIndex As Long

    Set lobjApp = New CRAXDRT.Application
    Set mobjReport = lobjApp.OpenReport(App.Path & "\Reports\" &
pstrFileName, 1)
    Set lobjApp = Nothing

    ' Switch the location stored within the report itself
    lstrLocation = mobjReport.Database.Tables(1).Location
    llngIndex = InStr(1, lstrLocation, "Proc(", vbTextCompare)
    lstrLocation = Database & ".dbo." & Mid(lstrLocation, llngIndex)
    mobjReport.Database.Tables(1).Location = lstrLocation

    ' Login to server
    mobjReport.Database.Tables(1).SetLogOnInfo gstrDBServer,
gstrDBDatabase, "MyUsername", "MyPassword"

End Sub

Public Sub SetReport(ByRef pstrReportName)

    Dim lstrLocation As String
    Dim llngIndex As Long

    Set objReport = Nothing

    Select Case pstrReportName
        Case "ReportA001Clin"
            Set mobjReport = New ReportA001Clin
        Case "ReportA001Slin"
            Set mobjReport = New ReportA001Slin
        Case "ReportA001TI"
            Set mobjReport = New ReportA001TI
        Case "ReportA004Main"
            Set mobjReport = New ReportA004Main
        Case "ReportLstOfCmpTIbyDate"
            Set mobjReport = New ReportLstOfCmpTIbyDate
        Case Else
            MsgBox "Could not load report."
            Call Unload(Me)
            Exit Sub
    End Select

    With mobjReport.Database
        lstrLocation = .Tables(1).Location
        llngIndex = InStr(1, lstrLocation, "Proc(", vbTextCompare)
        lstrLocation = gstrDBDatabase & ".dbo." & Mid(lstrLocation,
llngIndex)
        .Tables(1).SetLogOnInfo gstrDBServer, gstrDBDatabase
        .Tables(1).Location = lstrLocation
    End With

End Sub
Public Sub SetParameter(ByRef pstrName As String, ByRef pvarValue As
Variant)
    On Error Resume Next
    If mobjReport.ParameterFields.GetItemByName(pstrName).IsCurrentValueSet
Then
        mobjReport.ParameterFields.GetItemByName(pstrName).ClearCurrentValueAndRange
    End If
    mobjReport.ParameterFields.GetItemByName(pstrName).AddCurrentValue
pvarValue
    If Err Then
        MsgBox "Got an error setting parameter """ & pstrName & """ to
:" & pvarValue & vbCrLf & vbCrLf & Err.Description
    End If
End Sub

Public Sub DisplayReport()
    CRViewer1.ReportSource = mobjReport
    DoEvents
    CRViewer1.ViewReport
    DoEvents
    Screen.MousePointer = vbDefault
    DoEvents
    On Error Resume Next
    Me.Show
End Sub
Private Sub Form_Resize()
    CRViewer1.Top = 0
    CRViewer1.Left = 0
    CRViewer1.Height = ScaleHeight
    CRViewer1.Width = ScaleWidth
End Sub



Sun, 18 Apr 2004 23:53:34 GMT  
 -2147206429 (80043ae3) Invalid TLV Record
These are the 3 scenarios I am getting:

1) Author of original crystal report does not get any errors when
running through the VB program.

2) When I run the crystal report through VB, I get "Server has not yet
been opened".  The crystal report viewer is displayed with no results.
 This occurs on the line "CRViewer1.ViewReport".  However - I can run
the crystal report with the Crystal Report Applicatio just fine and
view the results.  The database settings appear to be correct.

3) When my manager runs the VB Program he gets -2147206429 (80043ae3)
Invalid TLV Record" and his application crashes.

We all use Crystal Reports 8.5 and are running it on Windows NT 2000
Professional.  The files are in the correct place.  The error message
would state "File Not Found" rather then the TLV error.

The problem that boggles my mind is that my errors are seperate from
the managers errors - yet they occur in the same area.



Mon, 19 Apr 2004 04:36:12 GMT  
 -2147206429 (80043ae3) Invalid TLV Record
Hi Lewis,
    I don't know if this is of much help, but, the only time that I received
this error, I had a corrupt report file.  I opened a previous version of the
report and there was no more error message.  I never found out exactly what
had happened to that corrupt version of the report, but I managed to get
around the problem by starting with an older version and making my changes
to that.

Bob Holmes



Quote:
> These are the 3 scenarios I am getting:

> 1) Author of original crystal report does not get any errors when
> running through the VB program.

> 2) When I run the crystal report through VB, I get "Server has not yet
> been opened".  The crystal report viewer is displayed with no results.
>  This occurs on the line "CRViewer1.ViewReport".  However - I can run
> the crystal report with the Crystal Report Applicatio just fine and
> view the results.  The database settings appear to be correct.

> 3) When my manager runs the VB Program he gets -2147206429 (80043ae3)
> Invalid TLV Record" and his application crashes.

> We all use Crystal Reports 8.5 and are running it on Windows NT 2000
> Professional.  The files are in the correct place.  The error message
> would state "File Not Found" rather then the TLV error.

> The problem that boggles my mind is that my errors are seperate from
> the managers errors - yet they occur in the same area.



Fri, 23 Apr 2004 23:18:11 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. -2147206429: invalid TLV record

2. Invalid TLV Record

3. Invalid TLV Record

4. Invalid TLV record

5. Error: Invalid TLV record

6. Invalid TLV Record in CRViewer

7. Invalid TLV record error

8. CRAXDRT.DLL and Invalid TLV Record

9. SCR8 - Graphs - "Invalid TLV Record"

10. Invalid TLV Record in Report Designer Component?

11. Invalid TLV Record

12. Invalid TLV Record - Crystal 7 (Delphi 4)

 

 
Powered by phpBB® Forum Software