Adding Headings and Footings to a Report

How to:

You can use headers and footers to add key information, such as purpose of the report and the audience for whom it is intended.

You can add multiple lines of information into the heading and footing areas in a report, and apply different styling options to different sections of the heading or footing. This accommodates thorough explanations and additional information, while offering the most readable presentation.

When you create a report, the heading area is visible at the top of the canvas, and shows default placeholder text. You can double-click this text to edit the page header.

Footers are not enabled, by default, but can be enabled on the Designer toolbar, in the Show option menu, as shown in the following image.


Show on menu with Heading and Footing options

Once enabled, default placeholder footing text appears below the report. Double-click this text to edit it.

When you double-click the Page Heading or Page Footing placeholder text in the canvas, the heading or footing is selected for editing and the styling toolbar appears.

You can make styling changes to the text in your headers and footers, according to your preferences. Using a WYSIWYG canvas, formatting changes are applied instantly, allowing you to see the results of your styling selections as you make them. When editing your header or footer, you can find the options at the top of the canvas, as shown in the following image.


Styling toolbar for a page header

You can change the font and font size using the drop-down lists. You can add bold, italic, and underline accents to your text. In addition, you can change the positioning of your text (left, center, and right). You can also customize the color of the text, as well as the background of the header or footer text area. When your formatting is complete, you can close the toolbar and continue working with your report. The canvas adjusts to ensure that all lines of the heading or footing are visible.

You can add a new line in the heading and footing by pressing the Enter key. The number of lines of heading and footing you can add to a report is only limited by the available space on your screen. A scrollbar is added to a report if all of the data cannot fit on the page.

When you are done editing the heading or footing, click the X button on the styling toolbar to close it. Once you have edited the heading or footing, the updated text will appear when the report is run.

If you delete the header or footer text and close the styling toolbar, the header or footer is removed from the report, and the option to enable that component is deselected in the Show option menu. You can select the header or footer option to add it to the report again.

Heading and footing text in WebFOCUS Designer is created at the page level, so the heading or footing is displayed for each separate page of the report.

You can add dynamic heading or footing text by dragging a field from the Fields tab into the heading or footing text area, or by typing a less-than sign (<) followed by the field name. At run time, the first value for the selected field is displayed in place of the field name in the header or footer. You can combine dynamic page heading or page footing text with filters or page breaks to provide more relevant information at run time.

Procedure: How to Add a Dynamic Page Heading to a Report

You can add a dynamic page heading to a report that changes depending on filter selections and sort values for each page.

  1. On the WebFOCUS Home Page, click the Designer tab in the Action bar.
  2. Click Report.
  3. Select the wf_retail_lite.mas data source and click Select.
  4. Click the Style tab and select HTML from the Output Format menu.
  5. Return to the Display tab.
  6. In the Dimensions pane, expand Product, and add the Product Category and Product Subcategory fields to the Rows bucket, in that order.
  7. In the Measures pane, expand Sales, and drag Quantity Sold and Revenue to the Summary bucket.
  8. Create a filter for Customer Country.

    In the Dimensions pane, expand Customer and drag Customer Country into the Filter toolbar.

  9. Select Argentina, and click outside of the filter control to apply the filter.
  10. Create a page break after each Product Category value.

    Right-click the Product Category field in the Rows bucket, point to Insert Breaks, and click Continuous numbering.

  11. Double-click the Page Heading text above the report to select it for editing.
  12. Delete the placeholder text in the heading area, and type Sales for.
  13. From the Dimensions pane, drag the Product Category field into the heading area after where you typed Sales for.

    The heading should resemble the following image. Dynamic values for the Product Category field will be substituted for the text string starting with the less-than sign (<) at run time.


    Dynamic header text at design time: Sales for <WF_RETAIL_LITE.WF_RETAIL_PRODUCT.PRODUCT_CATEGORY
  14. Click the close button on the styling toolbar to finish editing.
  15. On the Designer toolbar, click the Show option menu and select Footing.
    The text Page Footing appears at the bottom of the page.
  16. Double-click the Page Footing text to select it for editing.
  17. Type, This report shows figures for sales in.
  18. From the Dimensions pane, drag the Customer Country field into the footing area after the text that you just typed.

    The name of the field, with a less-than sign in front of it, appears in the page footing area.

  19. With the entire page footing text selected, click the Italic button on the styling toolbar.
  20. Click Preview to see a run-time view of the report.

    Notice that the page header appears and displays a different value for each Product Category value. The Page footer appears below each section of the report, and indicates that values are for Argentina, since this was the value selected for the Customer Country filter. If you were to select a different value for Customer Country, the footing text would automatically change.

    The following image shows an example of what a section of the report may look like.


    Report with dynamic header and footer at run-time

WebFOCUS