I've got the same issue, recently migrated to 64 bit, most reports run fine, but those with a command under database fields give a log on failed error. In 32 bit these worked fine.
From what I understand, the log on error shows up for most every error in crystal reports.
I am not setting the location field.
Here is the code:
TableLogOnInfo tableLogOnInfo = new TableLogOnInfo();
ConnectionInfo connectionInfo = new ConnectionInfo();
connectionInfo.ServerName = DSN;
connectionInfo.UserID = Username;
connectionInfo.Password = Password;
connectionInfo.DatabaseName = string.Empty;
tableLogOnInfo.ConnectionInfo = connectionInfo;
foreach (CrystalDecisions.CrystalReports.Engine.Table table in ReportDocument.Database.Tables)
{
table.ApplyLogOnInfo(tableLogOnInfo);
//this line fails, but only when the report has a command object instead of the table individually listed
if (!table.TestConnectivity()) throw new Exception("No database connection.");
}