Once you have defined an ODBC data source, you can add an ODBC Database table to your project file. Then, after adding the table, you can view the table and edit its properties, refresh its data using the Relink command, and rename, duplicate, or remove the table.

 

Note that you can find specific examples of adding tables based on Microsoft Excel (XLS), Microsoft Access (MDB), and comma-separated value (CSV) databases in the previous section.

 

To add an ODBC Database table to your project file

 

1.Double-click the Tables item.

2.From the Link Table dialog box, select ODBC Database.

 

link_table_dialog_2

 

3.Click Next.

4.On the User DSN or System DSN tab, select the database with which to work.

5.If required, type a user name and password into the User Name and Password fields.

6.Click Next.

7.On the Table or Query tab, select the table or query to add to your project.

8.Click Link.

9.Click Close.

 

To view the properties of an ODBC Database table

 

1.Click the icon_expand to expand the Tables item.

2.Click an ODBC Database table. The table’s properties will appear in the Properties Pane.

 

To edit the properties of an ODBC Database table

 

1.Click the icon_expand to expand the Tables item.

2.Right-click the ODBC Database table you want to edit, and click Show Table.

3.In the Properties Pane, adjust the table’s properties as required.

 

The Design View will contain Field Name, SQL Data Type, and Java Data Type columns:

 

link_table_design_view_column_headings

 

You cannot edit the fields in any of these columns.

 

To relink an ODBC Database table

 

1.Click the icon_expand to expand the Tables item.

2.Right-click the ODBC Database table you want to relink, and click Relink Table.

 

Note that the Relink Table command is only available for ODBC Database and JDBC Database tables. This command allows you to relink the table in order to pick up changes made to the table or query (such as adding or removing a column, etc.).  If you make changes to the linked source table, but do not subsequently use the Relink Table command, the table definition will not be up-to-date.

 

To rename an ODBC Database table

 

1.Click the icon_expand to expand the Tables item.

2.Right-click the ODBC Database table you want to rename, and click Rename Table.

3.Type a new name for the table in the edit field.

 

Note that you should not rename a table that is already being referenced in another item of the project (for example, in a report or label). If you rename a table that is already being referenced, you will break the link from the report or label to the data in the table.

 

To duplicate an ODBC Database table

 

1.Click the icon_expand to expand the Tables item.

2.Right-click the ODBC Database table you want to duplicate, and click Duplicate Table. A copy of the table appears in the list.

 

To remove an ODBC Database table from your project file

 

1.Click the icon_expand to expand the Tables item.

2.Right-click the ODBC Database table you want to delete, and click Remove Table.

3.In the Delete Confirmation dialog box, click Yes.

 

Note that there are issues that exist when attempting to link to a comma-separated value file through an ODBC data source in PEERNET Reports Designer running on a 64-bit operating system such as Windows Vista 64.  Adjusting the default file extensions in the CSV data source results in invalid data being written to a key in the Windows registry.  This then results in the following error message when attempting to link to a table through the CSV data source:

 

link_table_comma_separated_value_error

 

This error can best be avoided by adjusting the file extensions in the CSV data source back to their default values.  Please note that we DO NOT recommend manualy changes to Windows Registry entries; incorrect changes can result in severe problems with your application and operating system.  More information regarding this error can be found by consulting the following Microsoft Support KnowledgeBase articles:

You receive an error message when importing, exporting or linking text files

ACC2000: Error Message Importing, Exporting, or Linking Text Files

ACC97: Error Message Importing/Exporting/Linking Text Files