[RESOLVED] Crystal 9 VS 2008
I have a viewer (crViewer) set up in my program. the program imports CrystalDecisions.CrystalReports.Engine & CrystalDecisions.Shared.
I am getting an error (on the last line of the following code). "An error occurred. The data necessary to complete this operation is not yet available. (Exception from HRESULT: 0x8000000A)"
Code:
Private Sub SetDBLogonForReport(ByVal myConnecionInfo As ConnectionInfo)
Try
Dim myTableLogoninfos As New TableLogOnInfos
Dim myTableLogoninfo As New TableLogOnInfo
Dim crTables As Tables
Dim crTable As Table
Dim crReportDocument As New ReportDocument()
crReportDocument.Load(glbReportname)
crTables = crReportDocument.Database.Tables
For Each crTable In crTables
myTableLogoninfo = crTable.LogOnInfo
myTableLogoninfo.ConnectionInfo = myConnecionInfo
crTable.ApplyLogOnInfo(myTableLogoninfo)
Next
CRViewer1.ReportSource = crReportDocument
Catch ex As Exception
System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default
MsgBox("An error occurred: " & Err.Description & " - Source: (CRViewer)SetDBLogonForReport")
End Try
End Sub