Creating a Dynamic Data Table Manually |
Advanced users may want to manually create a dynamic data table. Creating the table manually can be useful in some circumstances, such as when you want to include only a subset of fields from the connected database or when you want to connect to a data source other than a database, such as file names in a folder, a printer list, or a Visual Basic Script result.
Use the following procedures as a guide for manually creating a dynamic data table.
You can create the dynamic data table by adding a standard table to the template and then configuring the data that you want to dynamically populate the table.
When possible, consider the number of rows and columns that you want for your table before you create the table. For a dynamic data table, you need to create only one row for the data that you want to display, but you might want additional rows for header information, page or group headers and footers, and so on.
To add a table object to the template
On the object toolbar, click the icon to display the table options. Alternatively, click Table on the Create menu.
Drag the pointer across the interactive cell selector panel to highlight the number of rows and columns that you want, and then click the selector panel. Alternatively, click Insert Table, specify the number of rows and columns that you want by using the Insert Table dialog, and then click OK.
Click the template at the location where you want to add the table object.
Open the Table Properties dialog to configure the object. To do this, double-click the object. Alternatively, right-click the object, and then click Properties.
Use the Table Data property page to specify the source that you want for the table data. You can also use this property page to change the data display in the table from rows to columns.
To specify the source that you want for the table data
Open the Table Properties dialog. To do this, double-click the object. Alternatively, use the secondary mouse button to click the object, and then click Properties.
In the navigation pane, click Table Data to display the Table Data property page.
Select from the Table Data list to arrange your data in rows or columns.
Specify the Source property. To do this, click , and then select the source that you want.
Configure the source by specifying its dependent properties. For example, click Edit Script to configure the Visual Basic Script source that you want to populate the table.
|
For more information about the properties that you can configure for each table data source, refer to Table Data Property Page. |
To ensure that the table displays the data correctly, you must assign table data templates. When the table is configured to display the data in rows, you can assign a table data template to each row in the table by using the Rows property page. When the table is configured to display the data in columns, you can assign a table data template to each column in the table by using the Columns property page.
By default, after you specify a source for the table data, the table data template type is Data for each row (when data is arranged by rows) or each column (when data is arranged by columns). Because only one row or column that has a Data table data template is required to display the multiple records of the dynamic data, you can specify other table data templates for any other rows or columns in the table. For example, you might want to select the Table Header template for the first row or first column in a table so that the row or column can display headers for the data.
You can change the table data template for a row or column by using one of the following methods.
To change the table data template type for a row
|
Use this procedure for table objects that have table data that is arranged in rows. |
Open the Table Properties dialog. To do this, double-click the object. Alternatively, use the secondary mouse button to click the object, and then click Properties.
In the navigation pane, click Rows to display the Rows property page.
In the Rows pane, click to select the row that you want.
In the Row Properties pane, click Template, click , and then click to select the table data template that you want.
When you select the Group Header or Group Footer table data template, you must also specify the Group By and Page Break properties.
To change the table data template type for a column
|
Use this procedure for table objects that have table data that is arranged in columns. |
Open the Table Properties dialog. To do this, double-click the object. Alternatively, use the secondary mouse button to click the object, and then click Properties.
In the navigation pane, click Columns to display the Columns property page.
In the Columns pane, click to select the column that you want.
In the Column Properties pane, click Template, click , and then click to select the table data template that you want.
When you select the Group Header or Group Footer table data template, you must also specify the Group By and Page Break properties.
|
For more information about table data templates, refer to Using Table Data Templates. |
After you select the source that you want for the table data, the Table Data Fields data source type is added to the Data Sources pane of the Toolbox. You can expand the Table Data Fields node in the Data Sources pane to view the available data sources that are related to the source that you selected for your table data.
You can add a Table Data Field data source to the table by dragging it from the Toolbox. This method creates a text object.
To drag a Table Data Field data source to the table
Click the Data Sources tab in the Toolbox to display the Data Sources pane.
Expand the Table Data Fields node.
Expand the table node for the table that is connected to the source that contains the data that you want.
Drag the data source that you want to the table cell where you want to place it. A text object that is linked to the data source is added to the table cell.
|
You can configure the object's Table Data Field data source, and configure a data field function for the data source, by using the Data Sources property page. For more information about data field functions, refer to Using Table Data Field Functions. |
You can also add a text or barcode object to the table and then link the Table Data Field data source that you want to the existing text or barcode object.
To link a Table Data Field data source to an existing text or barcode object
Add the existing text or barcode object to the table. To do this, refer to Adding Objects to a Table Object.
Open the text or barcode Object Properties dialog. To do this, double-click the object. Alternatively, use the secondary mouse button to click the object, and then click Properties.
In the navigation pane, delete the existing data source, and then click to start the New Data Source wizard. Alternatively, click to select the existing data source, and then click next to Type to start the Change Data Source Type wizard.
For the new data source type, select Table Data Field, and then complete the remaining steps in the wizard to specify the Table Data Field data source that you want to link to the object.
When the wizard is finished, you can configure the data source further, and configure a data field function for the data source, by using the Data Sources property page. For more information about data field functions, refer to Using Table Data Field Functions.
Related Topics