When using a native Oracle connection I can’t get reports to run against a remote Oracle Database. I’m using a C# thick client application with Crystal Reports 11 runtime, going to an Oracle Database Server 10G (v10.2.0.3). When the database server is running on the same computer as my client application, the report works fine, but when I set the connection information to connect to a remote database server, I receive an error when I run the report.
When I use Crystal Report’s IDE on my client and set Data Source Location to the remote database server the report runs fine.
At runtime using my client application I’m setting the Connection Information for all tables and sub-tables in the report. Once these are set I do a Tables.TestConnectivity and it succeeds. But when I do a ShowFirstPage on my client I receive the following error:
This field name is not known. Details: errorKind Error in File C:\WINDOWS\TEMP\87117d15-64e3-4328-8350-dac794a420eb {19CEB7FC-E8A8-497D-9F44-D1147F8575B2}.rpt: Error in formula <FormatProcessedBoolean>. 'CBool ({SkipCode.PROCESSEDTYPEINDICATOR})' This field name is not known. Details: errorKind
Details of the code in the client application:
ConnectionInfo crConnectionInfo = new ConnectionInfo();
crConnectionInfo.ServerName = Server;
crConnectionInfo.DatabaseName = "";
crConnectionInfo.UserID = UserID;
crConnectionInfo.Password = Password;
foreach (CrystalDecisions.CrystalReports.Engine.Table aTable in crTables)
{
TableLogOnInfo crTableLogOnInfo = new TableLogOnInfo();
crTableLogOnInfo = aTable.LogOnInfo;
crTableLogOnInfo.ConnectionInfo = crConnectionInfo;
aTable.ApplyLogOnInfo(crTableLogOnInfo);
string tableName = aTable.Location.Substring (aTable.Location.LastIndexOf(".") + 1);
string schemaAndTableName = Database + "." + tableName;
aTable.Location = schemaAndTableName;
}