Ramapo Masters of Science 
in Educational Technology

Tools and Concepts of Data Analysis: Dataweb


Formatting Query Tables II (home)

Overview | Example | Resetting Table Properties | Basic Redesign

Creating New Rows | Tables Within Tables | Formatting for Usability

Overview: Formatting Query Tables

Sometimes when creating a query page with FrontPage, the contents of the query force the table wider than the acceptable maximum of 760 pixels (660 pixels for printable pages). Resetting the table to 760 pixels or less will not be successful if the contents of the cells can not fit within that width. This is likely to occur if you are creating a "profile" or "overview" query that displays all gathered information for a single person.

Tables that exceed 760 pixels are never acceptable as they might force a user to scroll horizontally to view the data. In order to correct this situation, we must reformat the table so that the data is displayed in a more vertical manner.

Top | Home


Example

In the example below, I created a query and then set the table that contained the results  to 760 pixels in width. Below that I inserted another table with a width of 760 pixels. Note the difference in width between the two. This results from the fact that the content in the first table has forced it wider than the setting it was given.

Top | Home
 


Resetting Table Properties

The first thing that needs to be done is to reset the existing table with regards to table width, cell padding, cell spacing, border width, and alignment.

Right Click on table | Table Properties

Check the fixed width checkbox | select the "Pixels" option | type in desired width

Set table alignment, cell padding, cell spacing, border size, border color as desired | OK

Top | Home
 


Basic Redesign

Since the data in the new narrower table must be stacked vertically to some degree, the header row containing the column labels no longer make sense. To delete them:

Place your cursor on the left edge of the left most cell.  It will become a small black arrow.

Click to select the header row | Edit | Cut

Merge all the cells in results area (between the yellow areas)

Select all the cells* | right click | merge cells

*Selecting cells may be difficult. If so:

Select first cell | Depress and hold down shift key | use right arrow on your keyboard to complete the selection.

Note that the width of the query table now matches the width of the sample table beneath

Top | Home
 


Creating New Rows

Place your cursor in the single remaining cell in the results area

Table | Insert | Rows or Columns

Select Rows | Select "Above Selection" | Enter Number of Rows | OK

Split the new row into cells if needed

With cursor in row - Right Click | Split Cells

Select "Split into columns" | enter number of columns | OK

Set cell widths so that all cells in each row total to the total width of the table

Drag the variables into your new row and add text as needed

Continue adding rows as needed. To create a row with the same properties as another row (number of cells, alignment in cells, width of cells, etc.) initiate the process of creating the new row from somewhere within the model row. Remember that although you may split or merge cells in a row, they must conform to an underlying grid pattern.

This table

         
         
         
         
         

can be converted into this table

       
       
     
       
 

because the merges are based on the underlying 5 by 5 grid.

It can not be converted into this table.

 

       
         
       
         
     
(This is actually five separate tables)

because the rows do not honor the underlying grid.

If you need to to create rows that do not conform to the underlying table grid in a query, it is a bit trickier. For help see the next section, "Tables Within Tables"

Top | Home
 


Tables Within Tables

You may at times need rows in a table that do not conform to an underlying grid pattern. When possible I would suggest stacking independent tables one under the other. This is not an option in the results area of a query because all results are already contained within the table created by FrontPage and must remain there.

In order to deviate from the grid set by the original (parent) table, you should create a single row with a single cell in that table and insert another table (child table) within that cell. You might need to merge cells in order to accomplish this. The width of cells in the child table can be set without regard to the grid of the parent table that contains it.

Because this new table is contained within another table, its overall size must allow for any cell spacing or cell padding in the parent table. For example, if my parent table has a width of 760 pixels and a cell padding of 5 pixels (applied to all four sides), my interior table must have a width of 750 pixels to fully occupy the available space.

To nest a table within a table:

Insert a new row in the parent table (see first two steps in "creating new rows")

merge its cells if needed - Select Cells | Right Click | Merge Cells (see "basic redesign")

Carefully calculate the width of the child table. You may need to right click in the parent table and choose "table properties" to check the overall width, cell padding and cell spacing setting of that table. In this example we have a parent table with a width of 760 pixels, cell padding of 5 pixels, and cell spacing of 0 pixels. The child table must have a width of 750 pixels to leave room for 5 pixels to the left and 5 pixels to the right.

With your cursor in the cell - Insert | Table | Table

Choose "Specify Width" | Select "pixels" | Enter width | set other table properties | OK

Select Cells (one or more) | Right Click | Cell Properties | Set cell properties

Select and Delete any unneeded rows

Top | Home
 


Formatting for Usability

Formatting query results should be focused primarily at making the information easily accessible. Font choice, font size, alignment, font color, spacing, and cell background color can all be used to make a page more readable. You can also add visual breaks such as blank rows with background color or horizontal lines to visually distinguish between records.

In a vertically formatted query such as the one we have just developed we will need to replace the deleted header row with labels inside the results area to identify the the variables displayed. It is generally a good idea to format the labels in one way (perhaps bolded) and the data another.

The example below shows our query in progressive stages of formatting.

Top | Home
 


Site Designed and Maintained by rsciorra
Last Updated 01/21/08