Miscellaneous Features

This section discusses miscellaneous features of the Freeform Report Designer, such as using and creating table styles, selecting fonts and colors, inserting headings, table of contents, and so on.

 

   Note:


    Although Freeform Report Designer supports both HTML and PDF as output types, some elements and features are not supported in both formats. See Table 88 for detail information.


Changing Views

Freeform Report Designer provides three views, that is, ways of displaying the template layout, including:

Changing the view can be done by choosing the View menu and selecting one of the three options, or use the relevant buttons in the toolbar, as shown below:

 

   Figure 299: Changing Views Buttons

Page Layout

The Page Layout view allows access to the content of the template including page elements and the contents of page areas (For example, report, chart, headers and footers).

The Page Layout view is shown below:

 

   Figure 300: Page Layout View

This view displays elements in the same way they are laid out in the final report upon viewing or printing. One major difference between the template layout view and the final report is that the template does not contain actual report or chart data. The reports and charts that are seen in the page layout view are merely place holders. Therefore, the page layout view essentially shows the flow of the elements. As the element contents change, the positions of the elements shift in the flow. However, since all positioning in the template is done relative to the previous element, the overall layout stays unchanged, and no overlapping of the elements results from the content changes.

Element Map

When Element Map is selected in the View menu, the Freefrom Report Designer shows a listing of elements contained on the template to the left of the page layout view. The element list provides direct access to each of the elements. For example, you can double click any element and access its properties dialog.

The Element Map view is shown below:

 

   Figure 301: Element Map View

The left part of the screen shows the element tree, and the right part shows the Page Layout view. The element tree shows each page as a branch, with each page sub-tree listing all elements on that page. Selecting an element node on the tree also selects the same element on the page layout view. The element tree is very useful for visualizing the element sequence and ordering, which may not be obvious in the page layout view.

Note that the element tree does not list page area elements by grouping them by areas, instead, area elements are all listed using a uniformed ordering, with the sequence of areas considered first, then the sequence of elements inside areas.

Master Layout

The Master Layout view is the only view that allows you to place, remove, or alter page areas. Elements currently on the template are not visible in this view.

The Element Map view is shown below:

 

   Figure 302: Element Map View

Positions and sizes of areas can be set using the Properties window. The position value can have X and Y values in inches from the top left printable edge of the template, as well as relative Y value in inches from the bottom of a particular area.

The width and height values can be set to fixed values in inches, and there are options that control how the area behaves when the content overflows. You can choose to fix the area height and any content that overflows the area gets truncated. You can also choose to let the area height automatically fit the content. The third option applies to HTML only. It controls the display of horizontal and vertical scrolling bars whenever the content overflows, and the size of the display area is determined by the values entered in the fixed value fields.

Changing Modes

When adding elements to a page or a page area, you may need to change the mode of the Freeform Report Designer. Two modes are available:

Element Selection Mode

To switch the Freeform Report Designer into element selection mode, click the pick tool, as shown below:

 

   Figure 303: Pick Tool

By default, the designer is in element selection mode. This means that whenever a mouse click happens inside an element, the element is selected as the current element. Once an element is selected, some attributes can be modified by using the buttons on the toolbar. Most of the commonly changed attributes have corresponding toolbar controls. Besides this method, you can also double click an element to open its Properties window, which provides full control of the element's attributes.

Here are a few of the commonly used attribute controls:

Text Mode

The Freeform Report Designer can be switched to text mode by clicking the text tool, as shown below:

 

   Figure 304: Text Tool

Text mode is used primarily to enter text on the template. If a text based element is selected in this mode, an editing field is placed at the element location and the cursor changes to a text cursor. The contents of the text based element can be changed by entering the text in the field (Ctrl+C/V is functional for copying and pasting text into fields). If a table is selected, the clicked table cell changes to an editing field.

If the cursor is not positioned next to a text element, entering text automatically creates a new text element at the location, with the entered contents.

 

   Note:


    When you wish to add elements onto a page instead of an area, change the Area mode to Non-container, otherwise no elements can be added to a page. This can be done by selecting the menu option FileÆPage Setup. For more information on the Page Setup dialog, see Page Setup on page 483.


Using the Ruler and Grid

You can use the ruler and grid to facilitate positioning of elements added on your freeform template.

To display the ruler or grid, check the Ruler or Grid option from the View menu. Horizontal and vertical rulers appear across the top and along the left side of the page. The grid displays a set of horizontal and vertical lines to delineate the template page.

The other option of the View menu is Snap to Grid. This option is selected by default such that any elements on the freeform template are displayed aligning with the grid. This option affects the display result only when you design a template, and is not saved into the template definition file and thus does not make any impact on report outputs. This means that the positions of the elements in HTML or PDF output are determined by their positioning properties, not this option.

Working with Elements

Creating a template involves inserting elements into the template. The insertion point is decided by the current selected element. If an element is selected, any new element inserted using the toolbar buttons or the pull-down menu is inserted before the selected item. This is visually indicated by a small triangular cursor in front of the selected element. If no element is selected, the insertion point is placed after the last element. All new elements are added to the end of the template.

Using Float and Inline Elements

A template consists of a main flow of elements, where each element is laid out sequentially. An element is positioned immediately after the previous element. Some elements alter the document flow such as adding newlines, spaces, and page breaks. For example, adding a page break causes a new page added to the last page.

Inline Elements

Inline elements strictly follow this layout model. Their positions and sizes are calculated by Freeform Report Designer according to the previous element's position, and the current element's contents.

Inline elements include:

Float Elements

All float elements are rectangular in shape in the Freeform Report Designer. The positions and sizes of float elements can be adjusted.

When a float element is selected, a resize box is placed around the element. The size can be changed by dragging a resize handle on the resize box. An example of a chart with the resize handles displayed is shown below.

 

   Figure 305: Chart with Resize Handles Displayed

The position of a float element is controlled by its anchor. If no anchor is set for the float element, the element is laid out as a regular inline element, immediately following the previous element. An anchor changes the element placement by specifying an offset from the top of the current line, and from the left edge of the printable page area.

Float elements include:

For more information on float elements, refer to Using Float Elements on page 488.

Using Property Windows

Each element has an associated Property window that contains element attributes and element contents. The Property window can be opened by double-clicking an element, or right-clicking the element and selecting Properties from the popup menu. An example Property window for an image element is shown in Figure 277.

Each property window consists of one or more tabs, with each tab containing controls for a class of attributes. The types of tab on a property window vary with the element being accessed. Every property window contains an Attributes tab, which has the common attributes of all elements. Elements belonging to the same group also share one or more tabs. For example, all float elements have a Layout tab which has the anchor, size, and wrapping attributes.

Building Headers and Footers

Generally, headers and footers are used to display meta information such as title, date/time, and page numbers. The following toolbar buttons are used to select the different areas of the page.

 

   Figure 306: Selection Toolbar Buttons

To add a header or footer to a report, firstly, select the header or footer as the current editing target using one of the following three methods:

Once the header or footer is selected, a shaded rectangle is drawn around the target editing area. For the header, this is located at the top of the page, while for the footer, the rectangle is located at the bottom of the page. All subsequently inserted elements are added to the header or footer.

Header and Footer Tags

The following tags are available to use in the header or footer to show information such as page numbers, dates, and current user name.

Table 96: Header and Footer Tags

Tag

Description

{P}

Page number

{N}

Number of pages

{D}

Generation date

{T}

Generation time

{U}

Current User

These tags can be added into headers or footers by adding a Text element then typing the tags in the text editing field. When your cursor is clicked on any location on the page other than on the editing field, the tags will be replaced with the actual information.

 

   Note:


   The header and footer tags are only recognized and replaced if they are within the template's header or footer. If they are placed anywhere else, the substitutions are not performed. The tags are not supported in HTML outputs. For more information, see Table 88.


 

Page Setup

The default page setup places the header 0.5 inches from the top, and the footer 0.75 inches from the bottom. The printable area is the paper size minus a one inch margin. To change the page layout, select the menu option FileÆPage Setup. The Page Properties window is displayed, as shown below.

 

   Figure 307: Page Properties Window

The Page Properties window presents the parameters of the current page. The properties are summarized in the table below.

Table 97: Page Properties Options

Properties

Description

Page Size

Sets the desired page size. Either select a standard page size from the drop-down list, or enter custom width and height values in the fields provided. The unit is defaulted to inches.

Orientation

Selects either the portrait or landscape orientation of the page.

Margin

Sets how wide the margin is from the perimeter of the page, in inches. The four values are defaulted to 1 inch. The page size minus the margin specifies the printable area on the page.

From Edge

Specifies the distance of the header and footer from the edge of the page.

Area Mode

Selects whether Page Area functions as a container for elements or non-container. For detailed information, refer to Miscellaneous Features on page 474.

The position and size of the header is controlled by the top margin and Header: field. The position and size of the footer is controlled by the bottom margin and Footer: field. After changing the header/footer or body layout, click OK.

More Headers and Footers

It is possible to set a different header or footer for specific pages. Click the black triangle in the corner of the Select Header or Select Footer buttons. A drop-down list is displayed listing the following page types:

Select the checkbox for the page type you want to display and edit. The Default header and footer checkbox is selected by default. The Default page header and footer is applied to every page on the report.

The Freeform Report Designer does not display headers or footers based on the page number. Instead, it shows the header and footer for the selected page type on every page. The correct headers and footers are applied when the freeform report template is previewed.

To view or edit the header or footer from another page type, you must explicitly select the page type from the drop-down list. The header or footer for this type is displayed on every page and you can change the content.

 

   Note:


    Empty header and footer page types are ignored. To force the header or footer to be empty, a non-visible element can be inserted as a place holder (for example, a space).


 

Using Table Styles

Table Styles consist of a set of pre-defined table presentation styles used to control the look and feel of a table. Each style defines the table border, colors, fonts, and many other visual attributes. Using a predefined table style ensures consistency throughout templates.

A table style can be selected from the table property dialog, as shown in Figure 285. The Table Style Viewer dialog is opened when the Select Style button is pressed:

 

   Figure 308: Table Style Viewer Window

The Table Style Viewer window can also be opened by selecting the menu option FormatÆView Table Styles.

 The Table Style Designer window displays a list of all available table styles in a hierarchical tree structure. The styles are organized into categories such as grid or list. One of the listed style categories is User Defined, which lists all the custom table styles.

The top-right panel displays a sample table using the selected style. The attribute checkboxes can be enabled or disabled. If an attribute checkbox is deselected, the attribute is not used in the table style definition. The effect of this change is shown in the sample table.

Select a style and select the attributes you wish to use, then click OK to apply the style to the currently selected table.

If you have created a custom style, you can select that style from the User Defined folder. This folder contains only those styles created using the Table Style Designer window. Custom (User Defined) table styles applied to header columns have no effect on tables that are imported from a Data Source. Information on creating custom table styles is provided in the following section.

Creating Custom Table Styles

In addition to the predefined table styles, new table styles can be created using the Table Style Designer.

To open the Table Style Designer window, select the menu option FormatÆCreate Table Styles. The Table Style Designer window is shown below.

 

   Figure 309: Table Style Designer Window

This window displays attribute items and provides a sample table showing the result of the attribute settings.

The attributes displayed in this window vary depending on the region in the sample table on which the mouse is clicked. In Figure 309, a user has selected a cell in the middle of the table and the window has changed to show the attributes for a body cell.

The following table lists the areas to select in order to view and edit the attributes for specific regions of the table.

Table 98: Table Regions

Region

Selection

Header Row

Click the first row

Header Column

Click the first column

Trailer Row

Click the last row

Trailer Column

Click the last column

Body

Click in the middle of the table (cells excluding header/trailer)

Top Border

Click the Top Border arrow

Left Border

Click the Left Border arrow

Right Border

Click the Right Border arrow

Bottom Border

Click the Bottom Border arrow

When a table region is selected, the top attribute panel changes to display only the fields appropriate for the selected region. For example, the Body region attributes include borders, colors, font, and alignment. The border regions only have border related attributes. When an attribute is changed on the attribute panel, the sample table displays the new specification.

After a style is created, it appears on the table style tree in the User Defined folder, and can be used by other tables in the template.

Table Borders

For a border style of None, all border settings in the table style must be set to None including: Body Row Border, Body Column Border, Header Row Border, Header Column Border, Trailer Row Border, Trailer Column Border, Top border, Bottom Border, Left Border, Right Border. If any of these are not set to None the border is set to 1 for the table.

 

   Note:


    Netscape browsers do not support border color and most border styles. However, both Netscape and IE browsers can support the None border style. Both IE and Netscape browsers do not support some built-in table styles, such as 3D.


Saving Custom Table Styles

Custom table styles can be saved by the Table Style Designer for reuse in other templates. To save the style file, select the menu option FileÆSave As.... Choose a folder in which to save the style, and enter a name and description.

If you are editing an already saved file, you can select FileÆSave or click the Save button to update the style.

Using Float Elements

Float elements have additional attributes to control the positioning and size of the elements. Float elements include images and charts (refer to Float Elements on page 480). When a float element is selected, its size can be changed using the resize handle on the selection box, and its position can be changed by dragging the element with the mouse.

The positioning of a float element is relative to the flow. Therefore, if the position of the preceding element changes, the position of the float element on a page changes.

A different mechanism, called a Container area, is used to place fixed position elements on a page, and is covered in Miscellaneous Features on page 474.

Anchors

The position of a float element is controlled by an anchor. If the anchor is not set, the float element is laid out as an inline element, immediately following the previous element. The anchor is set whenever a float element is dragged, or the position is explicitly set from its property window.

An anchor specifies the X and Y offset of the float element. The X offset is the distance from the left or right edge of the printable area on the page, the left side of the element. If the X offset is positive, the anchor value is treated as the distance to the left edge of the printable area. If the X offset is negative, the offset is the distance to the right edge of the printable area.

When a float element is dragged for the first time, the anchor X offset is always calculated from the left edge of the printable area. If the anchor should be placed against the right edge, the X anchor target can be changed via the property window.

The following figure shows the Anchor section of the Layout tab from the Image Properties window and the Chart Properties window.

 

   Figure 310: Anchor Property Area

The Y anchor can be one of two types. If the distance value is positive, the distance is from the top of the float element to the bottom of the last line. If the Y anchor is negative, the absolute value of the anchor is the distance from the top of the current line to the top of the float element.

The Y anchor value is calculated during the dragging of a float element based on the relative distance between the float element and the line. Due to text wrapping, the line height can change depending on the position of the float element. Therefore, the position where the float element is dragged may not be the same as the final position of the element after the anchor is set. It is sometimes helpful to set the values of the Y anchor explicitly on the property window.

Text Wrapping

When one or more anchored elements exist on a line, other flow elements could wrap around the anchored elements. The wrapping style is specified on the Layout tab of the properties window.

The following figure shows the Wrapping section of the Layout tab from the Image Properties window and the Chart Properties window.

 

   Figure 311: Wrapping Property Area

The icons are described in the following table.

Table 99: Wrapping Icon Descriptions

Icon

Description

1

Flow overlaps the float element.

2

Wraps around the left side of the float element.

3

Wraps around the right side of the float element.

4

Wraps around both sides of the float element.

5

No contents allowed on either side of the float element.

The wrapping style affects both anchored and unanchored float elements. The wrapping is handled differently depending on the anchor setting. Text on the left of an unanchored float element is never wrapped. The text on the right of an unanchored float element may or may not wrap, depending on the setting of the wrapping direction.

If wrapping direction is set to vertical (default) wrapping, right side text is always wrapped around a float element.

If the wrapping direction is changed to horizontal wrapping, the right side text is not wrapped. Only one line of text is placed on the right of the float element.

If the float element is anchored, the wrapping happens on both sides of the element (if the wrapping style allows). Again, the wrapping direction controls how the wrapping is done. Vertical wrapping is done by dividing the areas between the edges of the page and the anchored element into printable sub-areas. Text is placed in each sub-area, filling it before advancing to the next sub area.

If the wrapping direction is set to horizontal, the flow of text is across the sub-areas, from left to right, until the text is exhausted or the flow continues on the next line (below the anchored element).

The wrapping direction is a global attribute on a template and affects the wrapping of the entire report.

Margin

A margin can be placed around a float element. The margin reserves empty space around the element. The margin size can be controlled individually for each side: top, left, bottom, and right. For example, space can be added to the left and right side of a float element so that wrapped text is not placed directly against the float element.

The margin is specified as points in the property window.

Controlling Spacing with Spacing Elements

Spacing elements, unlike the elements that have visual representation in the Freeform Report Designer, change the spacing or breaking in the element flow.

Newline Element

To add a Newline element to the template, select one of the following options:

 

   Figure 312: Insert Newline Button

If a new line is added following the last element in a template, the printing is advanced to the next line. If a newline exists on a line by itself, the vertical advance is determined by the newline size in points.

A newline element can be marked as a line break. A line break does not force the following elements to be placed on a new line. It only advances the cursor according to the size specification. In normal flow, a line break behaves in the same way as a newline. However, it changes the flow of elements if anchored elements are used on the same line.

With the line break, all elements are processed in one pass to see if they fit on the same line. Standard anchored element wrapping is then applied. When the break is changed to a newline, the elements up to the newline are processed first. After the cursor is advanced by the newline, the elements following the newline are then processed. This causes the elements following a newline to always be placed below the newline element.

Newline Properties Window

To open the Newline Properties window, right-click the newline element and select Property from the popup menu.

In the Newline Properties window, select the number of new lines and the height of each new line in points.

Space Element

To add a Space element to the template, select one of the following options:

 

   Figure 313: Insert Space Button

A space element adds horizontal space between the element preceding the space and the element that follows. The space width is specified in points.

Separator Element

To add a Separator element to the template, select one of the following options:

 

   Figure 314: Insert Separator Button

A separator adds a horizontal line, which occupies the entire width of the printable area.

Separator Properties Window

To open the Separator Properties window, right-click the Separator element and select Property from the popup menu.

In the Separator Properties window, select the line style for the separator.

Only a single line style is supported in HTML output. All styles are supported in PDF output.

Page Break Element

To add a Page Break element to the template, select the menu option InsertÆPage Break.

Page Break elements advance printing to the next page.

Area Break Element

To add an Area Break element to the template, select the menu option InsertÆArea Break.

Area break elements advance the flow to the next area. For information on areas, see Adding Area Breaks on page 473.

Inserting Headings and Table of Contents

The Heading element is a special text element. When compared with a common text element, a Heading has similar attributes that control how a heading looks, in addition, it also has an additional attribute, which is Heading Level. The level of a heading can be modified using the heading's properties window.

When headings are added to the template, a heading number is automatically generated for each heading and displayed on the left of the text. Headings are ordered by the heading level they are in then the actual sequence by which they were added.

Headings can be used to create a Table of Contents (TOC) for the template. The heading elements become clickable links in the TOC (Limited to HTML output only).

Adding Headings

To add a Heading to the template, select one of the following options:

 

   Figure 315: Insert Heading Button

When you click the Insert Heading button, select a heading level from the drop-down list. If you use the menu option, the heading is added as level 1. You can change this level using the Heading Properties window.

A text editing field is placed at the cursor location, which can be used to enter the content of the heading element. Once the heading element is created, a heading number is automatically added to the left according to the heading level.

Heading Properties Window

To open the Heading Properties window, Right- click in the heading and select Properties from the popup menu.

The Heading Properties window contains the following tabs:

The first three tabs are identical to the tabs on the Text Properties window, as described in Text Properties Window on page 436.

The Numbering tab can be used to change the heading level.

Adding a Table Of Contents

The contents of the TOC (Table of Content) are automatically extracted from the heading elements in the template. To add a TOC element to the template, select one of the following options:

 

   Figure 316: Insert Table of Contents Button

The TOC Properties window is displayed, as shown below.

 

   Figure 317: TOC Properties window

Select the font to use for the table of contents by clicking the ... button. The Select Font window is described in Selecting Fonts within Property Windows on page 495.

Select a style for the TOC from the Style drop-down list. Freeform Report Designer supports the following built-in styles:

Selecting Fonts within Property Windows

The Select Font window is used to select the font for any element that contains text. For example, text box, form, or table. To open the Select Font window, click the ... button in the property window for the selected element.

The Select Font window is shown below.

 

   Figure 318: Select Font Window

Selecting Colors within Property Windows

Many elements allow you to select the color of the foreground and background. In the element property window, click the down arrow to open the color popup window, as shown below.

 

   Figure 319: Color Popup Window

Select one of the colors or click the Other... button to open the Select Color window. The Select Color window opens with the Swatches tab selected, as shown below.

 

   Figure 320: Color Select Window Swatches Tab

When you have selected a color click the OK button.

Swatches Tab

Click one of the swatch colors to select. The selection is applied to the images and text in the Preview area. When you hold your cursor over a color the RGB values appear in the tooltips field.

The selection also appears in the Recent area. Each selection you make is added to the next square in the Recent area. When this area is full the next selection is placed in the top left corner. The selections roll around to ensure the last 35 selections are always shown.

HSB Tab

The HSB tab allows you to select the color using the values for Hue, Saturation and Brightness. The HSB tab is shown below.

 

   Figure 321: Color Select Window HSB Tab

To select a color, move the arrow slider to the approximate color you require, then click inside the color square to select the exact color. Another method is enter values for H, S, and B, respectively:

H - Hue is defined as the color reflected from or transmitted through an object. Enter values in degrees between 0 and 360.

S - Saturation, sometimes called chroma, represents the amount of gray in proportion to the hue. Enter this value as a percentage.

B - Brightness is the relative lightness or darkness of the color. Enter this value as a percentage.

RGB Tab

The RGB tab allows you to select the color using the values for Red, Green and Blue. The RGB tab is shown below.

 

   Figure 322: Color Select Window RGB Tab

Move the sliders for Red, Green and Blue to select the color.

Alternatively, enter a value between 0 and 255 in the numeric fields to the right of the sliders.