Working with table frame objects

Paradox lets you add table frame objects to your forms and reports. You can link a table frame object to a table in the form or report's data model, but a table frame object is not a real table. It is a composite object that consists of columns representing fields, rows representing records, text objects that contain labels for the fields, and field objects that represent data from the source table.

When you create a multi-table form or report composed of a one-to-many relationship, or create a form or report with a tabular layout, a table frame is automatically added to the design document. However, you can also manually add a table frame to any form or report. You can then specify which fields to display, and you can modify the table frame's appearance in various ways.

In this section, you'll learn about

  adding table frame objects to forms and reports
  
  adding and removing fields in table frame objects
  
  inserting and removing columns in table frame objects
  
  resizing rows, columns, and headers in table frame objects
  
  moving columns in table frame objects
  
  working with table frame object headers
  
  specifying a grid style for table frame objects
  
  specifying how to display table frame objects when running reports
  
Adding table frame objects to forms and reports

You can add a table frame to any form or report. If you specified a table in the form or report's data model, the table frame objects can either be linked to or be independent of that table.

To add a table frame object to a form or report

1	Click Insert  Table frame.

2	Click in the design window.

If you need to move the table frame object, drag it to a new position in the design window.

Note

  When you insert a table frame object, it has a default size and shape. If you need to resize the table frame object, point to a selection handle and drag it to resize the object. For information about sizing and shaping objects, see "Sizing and shaping design objects."
  
Tip

  You can also insert a table frame in a from or a report by clicking the Table frame tool.
  
Adding and removing fields in table frame objects

Once you have added a table frame object to a form or report, you can add or remove fields in the object.

To add a field to a table frame object

1	Right-click the table frame object, and click Define table.

2	Click the data model button.

3	In the Data model dialog box, choose a table.

4	Click OK.

5	Double-click a field in the table's list box.

If a field is selected, it displays in the Included fields list.

You can also	

Add multiple fields to the Included fields list	Hold down CTRL, and click the fields from the table's list box. Double-click the last field you want to enter.

Change the order in which fields display in the table frame object	In the Included fields area, click the up or down arrows.

Note

  If the Size To Fit property is enabled on the Design page of the Properties dialog box, the table frame tries to size to the width required to show all columns. If it cannot, or if the Size to fit option is not enabled, the missing columns are still there.
  
To remove a field from a table frame object

1	Right-click the table frame object, and click Define table.

2	Choose a field from the Included fields list.

3	Click Remove field.

Inserting and removing columns in table frame objects

Paradox lets you insert and remove columns in table frame objects. Each column in a table frame object represents a table field. When you run the form or report, the column is filled with table records.

To insert a column in a table frame object

1	Click the table frame object.

2	Click the bottom of the table frame column.

If the column is selected, it is highlighted.

3	Right click the column, and click Insert column.

A new column displays to the left of the selected column.

To remove a column from a table frame object

1	Click the table frame object.

2	Click the bottom of the table frame column.

If the column is selected, it is highlighted.

3	Right click the column, and click Delete column.

Resizing rows, columns, and headers in table frame objects

Paradox lets you resize the columns, rows, and headers in table frame objects. For example, you can resize a header to accommodate the size of the header text.

To resize table frame columns

1	Click the table frame object.

2	Point to the column's vertical grid line.

A double-headed arrow displays.

3	Drag the arrow left or right.

Tip

  You can resize all columns to the minimum column width by right-clicking the table frame, and clicking Minimize columns.
  
To resize table frame rows

1	Click the table frame object.

2	Point to a row's grid line.

A double-headed arrow displays.

3	Drag the grid line up or down.

Note

  This resizes the row height for all the rows in the table frame.
  
To resize header areas

1	Click the table frame object.

2	Point to the grid line under the header rows.

A double-headed arrow displays.

3	Drag the grid line up or down.

Moving columns in table frame objects

Paradox lets you move a column in a table frame object. Moving a column allows you to modify the order in which the columns are displayed.

To move a column in a table frame object

1	Point to the table frame above the header of the column you want to move.

A double-headed arrow displays.

2	Drag the column to the new location in the table frame object.

Working with table frame object headers

When running a report that contains a table frame object, a group of records may break across several pages. When this happens, Paradox allows you to repeat the group header at the top of each page.

When adding a table frame object to a form or report, you can separate the header area (the labels) from the body of a table in a table frame. This allows you to move the header wherever you want. You can also rename a column header.

To repeat a table header in a report

1	With a report open in the design window, click the table frame object to select it.

2	Right-click the table frame object, and click Properties.

3	Click the General tab.

4	In the Header area, enable the Repeat header check box.

Note

  The Repeat header check box is not available if a table frame has detached headers.
  
To detach a header from a table frame object

1	With a form or report open in the design window, click the table frame object to select it.

2	Right-click the frame, and click Properties.

3	Click the General tab.

4	In the Header area, disable the Attached header check box.

Note

  Once you have detached the header from the table, it automatically aligns with the table. You can also drag the header up and down.
  
To rename a table frame column header

1	Click the table frame object to select it.

2	Double-click the column header field to select it.

3	Click in the column header field to place the cursor in the text.

4	Type a column name in the column header field.

Specifying a grid style for table frame objects

You can change a table frame's grid style. In addition, you can specify that a horizontal line displays between each record in the table when you run the report. The lines can help you scan across the records of large table frames.

To specify a grid style for a table frame

1	Right-click the table frame, and click Properties.

2	Click the Grid tab.

3	From the Grid style list, click one of the following options:

  Single - displays a single line frame around the table frame object
  
  Double - displays a double line frame around the table frame object
  
  Triple - displays a triple line frame around the table frame object
  
  3-D - displays a 3-D frame around the table frame object
  
  None - displays the table frame object without a frame
  
To display a horizontal line between rows of data

1	Right-click the table frame object, and click Properties.

2	Click the Grid tab.

3	Enable the Record divider check box. 

Specifying how to display table frame objects when running reports

Paradox lets you specify how you want to the content of the table frame to display when the report is run.

If you specify that you want all table frame columns displayed, then when the report is run the table frame expands across the page, creating as many pages as necessary to display all the columns. If you do not specify that you want all frame columns displayed, then the table frame displays as a fixed-width table, and not all of the columns are displayed.

If the table frame object is bound to a master table,, then all of the table's records display automatically when the report is run. You can specify that you want the records displayed in one table, or in two or more tables. For example, if a table frame object displays three rows in the report design window, the table records are grouped in sets of three when the report is run.

If the table frame object is bound to a detail table, you can choose whether to display all table frame records when the report is run.

You can also specify not to display a report's design object if it does not contain data. The object does not appear when the report is previewed or printed.

To display all the table frame columns when running a report

1	With a report open in the design window, right-click the table frame object, and click Properties.

2	Click the Run time tab.

3	Enable the Show all columns check box.

To display all the table frame records when running a report

1	With a report open in the design window, right-click the table frame object, and click Properties.

2	Click the Run time tab.

3	In the Show all records area, enable the Yes option.

Notes

  The Yes and No options display in the Show all records dialog box only if the table frame object is not bound to a table or if it is bound to a detail table. If the table frame object is bound to a master table, the options will be different.
  
  If the No option is enabled, the detail table frame will only display as many records as are displayed in the object that is in the report design window. When you run the report, the object will not expand or duplicate to display all the data from the detail table.
  
To display all the records in one table object when running a report

1	With a report open in the design window, right-click the table frame object, and click Properties.

2	Click the Run time tab.

3	In the Show all records area, enable the In one object option.

Note

  The In one object option is not available if the table frame object is not bound to a table or if it is bound to a detail table.
  
  The table frame object needs to be bound to a master table.
  
To display records in separate table objects when running a report

1	With a report open in the design window, right-click a table frame object, and click Properties.

2	Click the Run time tab.

3	In the Show all records area, enable the By duplicating order option.

Note

  The By duplicating order option is not available if the table frame object is not bound to a table or if it is bound to a detail table.
  
  The table frame object needs to be bound to a master table.
  
Tip

  You can have the object's frame snap to row by selecting the table frame object, right-clicking the table frame object, and clicking Fit rows.
  
To specify not to display empty fields when running a report

1	With a report open in the design window, right-click the table frame object, and click Properties.

2	Click the Run time tab.

3	Enable the Delete when empty check box.




