Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8712

Re: Failed to load Database information when trying to run a command report

$
0
0

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.");

                }


Viewing all articles
Browse latest Browse all 8712

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>