I have a CR that has a sybase datasource and 2 date parameters. In CR, under Set Datasource Location, I can see:
Database Type: Sybase Server
Server: MyServer
Database: MyDatabase
User ID: MyUserID

I am trying to connect to that report and run it/export it with runtime paramters from Access. My VBA code is :

Dim CrxApp As CRAXDRT.Application
Dim CrxRep As CRAXDRT.Report
Dim crxDatabase As CRAXDRT.Database
Dim crxDatabaseTables As CRAXDRT.DatabaseTables
Dim crxDatabaseTable As CRAXDRT.DatabaseTable

Set CrxApp = New CRAXDRT.Application
Set CrxRep = CrxApp.OpenReport(ReportName)

Set crxDatabase = CrxRep.Database
Set crxDatabaseTables = crxDatabase.Tables

For Each crxDatabaseTable In crxDatabaseTables
With crxDatabaseTable
'.ConnectionInfo.Item("Database Type") = "Sybase Server"
.ConnectionProperties.Item("Server") = "MyServer"
.ConnectionProperties.Item("Database") = "MyDatabase"
.ConnectionProperties.Item("User ID") = "MyUserID"
.ConnectionProperties.Item("Password") = "MyPassword"
End With
Next crxDatabaseTable

With CrxRep
.DiscardSavedData
.ParameterFields.GetItemByName("StartDate").AddCur rentValue CDate("2012-03-01")
.ParameterFields.GetItemByName("EndDate").AddCurre ntValue CDate("2012-03-31")
End With

With CrxRep
.ExportOptions.FormatType = crEFTPortableDocFormat
.ExportOptions.DestinationType = crEDTDiskFile
.ExportOptions.DiskFileName = PDFName
.ExportOptions.PDFExportAllPages = True
.Export False
End With


When I run it, it says "Logon Failed", any ideas? I can run the report successfully from CR.