Symptom
- Table indexes reflect the incorrect table names after the setTableLocation is called.
- As a result the tables have the wrong connection information and the report fails.
Cause
Issue occurs when using a numbered index to retrieve the tables.
Resolution
There is a work around available. This is in the form of a change to how tables are indexed within Crystal Reports Java SDK: they will need to be referenced by name instead of by index in order to ensure that all of the tables are retrieved and the database information is changed.
------- CODE EXAMPLE---------------
Tables tables = clientDoc.getDatabaseController().getDatabase().getTables();
for(int i = 0;i < tables.size();i++){
origTable = tables.getTable(i);
if (tableName == null || origTable.getName().equals(tableName)) {
newTable = (ITable)origTable.clone(true);
Keywords
KBA , BI-DEV-JAV , BI Software Development Kits (SDKs) - Java , Problem
Product
Crystal Reports for Java 1.0