MichaelaLee
Programmer
Hi Everyone,
I've searched the forums here and have not found a solution that works yet. I hope you all can help.
I'm working with Crystal Reports 9 and "SQL Server 2000".
I'm getting the following error when trying to load a
report in VB:
Error from the Crystal Report viewer.
Logon Failed.
Details: ADO Error code: 0x80040e4d
Source: Provider
Description: Authentication Failed.
Native Error: -2147217843
The SQL Server is setup for Windows authentication and I'm trying to use the following code to load the report:
Set crxReport = crInventoryADO
Set ConnectionInfo = crxReport.Database.Tables(1).ConnectionProperties
ConnectionInfo.Item("Data Source") = "SQLSERVER"
ConnectionInfo.Item("Integrated Security") = True
ConnectionInfo.Item("Provider") = "SQLOLEDB.1"
ConnectionInfo.Item("Database") = "NF_Inventory"
ConnectionInfo.Item("UserId") = ""
'ConnectionInfo.Item("Password") = ""
Set CRXParamDefs = crxReport.ParameterFields
For Each CRXParamDef In CRXParamDefs
With CRXParamDef
If .ParameterFieldName = "@ProgramId" Then
.ClearCurrentValueAndRange
.AddCurrentValue Str(Var)
End If
End With
Next
CRViewer91.ReportSource = crxReport
I really hope someone can help. THanks
Michael
I've searched the forums here and have not found a solution that works yet. I hope you all can help.
I'm working with Crystal Reports 9 and "SQL Server 2000".
I'm getting the following error when trying to load a
report in VB:
Error from the Crystal Report viewer.
Logon Failed.
Details: ADO Error code: 0x80040e4d
Source: Provider
Description: Authentication Failed.
Native Error: -2147217843
The SQL Server is setup for Windows authentication and I'm trying to use the following code to load the report:
Set crxReport = crInventoryADO
Set ConnectionInfo = crxReport.Database.Tables(1).ConnectionProperties
ConnectionInfo.Item("Data Source") = "SQLSERVER"
ConnectionInfo.Item("Integrated Security") = True
ConnectionInfo.Item("Provider") = "SQLOLEDB.1"
ConnectionInfo.Item("Database") = "NF_Inventory"
ConnectionInfo.Item("UserId") = ""
'ConnectionInfo.Item("Password") = ""
Set CRXParamDefs = crxReport.ParameterFields
For Each CRXParamDef In CRXParamDefs
With CRXParamDef
If .ParameterFieldName = "@ProgramId" Then
.ClearCurrentValueAndRange
.AddCurrentValue Str(Var)
End If
End With
Next
CRViewer91.ReportSource = crxReport
I really hope someone can help. THanks
Michael