Creating Precision Reports

The precision report is a report type that gives you an additional set of tools that make it easy to control the precise placement of objects and data in the report output. For example, with a precision report, you can quickly create a layout that is perfectly aligned for a preprinted form (like a bill of sale or a tax form) and that automatically breaks out one record per report page. Other benefits of precision reports include:

Precision reports are built in the Precision Report canvas. You can output them in PDF, DHTML, and PostScript formats.

You can convert an existing report into a precision report or you can create a new precision report.


Top of page

x
Accessing the Precision Reports Canvas

In this section:

How to:

Reference:

You can access the Precision Report canvas by converting an existing report or by creating a new precision report.

The following image is an example of the Precision Report canvas.

Precision Report canvas

Note: All of the tabs and panels that you use to develop regular reports are also used in precision reports. The additional tools found in the Precision Report canvas are available only for precision reports.

Related Information:



x
Procedure: How to Access the Precision Report Canvas by Converting an Existing Report
  1. Open the procedure (.fex file) for a selected report. To do this, you may use one of the following methods:
    • On the Home tab, in the Content group, click Report. The Report Wizard opens. Click Open Existing and follow the prompts to navigate to the report.
    • In the Environments Tree panel, navigate to the desired folder and double-click the report.
  2. If the selected procedure was created with the Report canvas, it will automatically open in the Report canvas.

    If the selected procedure was not created with the Report canvas, it will automatically open in the Procedure Viewer. In this case, double-click a report component to open it in the Report canvas.

  3. On the Report tab, in the Report group, click Precision Report.

    A style warning message appears, indicating that the report will be converted to a precision report.

  4. Click Yes to convert the report and open it in the Precision Report canvas. The next time the report is opened, the Precision Report canvas will automatically be active.

    Similar to the Object Inspector in the Report canvas, the Precision Report canvas includes a window containing tabs used for creating and building Precision Reports. This window has the Fields, Sort Groups, Properties, and Columns tabs found in the Object Inspector, but also includes the Layers tab and Navigate tab, which are unique to the Precision Report canvas.

    The window is shown in the following image.

    Precision Report tabs

By default, the report output is PDF. To change the output format, on the Format tab, in the Output Types group, click Output Format. In the drop-down menu that appears, point to Styled report formats, and click the desired output.

You may edit the report by changing the alignment and position of the objects in the report.

Related Information:



x
Reference: Usage Notes for Converting Existing Reports to Precision Reports

The following conditions apply when converting existing reports to precision reports:



x
Procedure: How to Access the Precision Report Canvas for a New Report
  1. To access the Precision Report canvas for a new report, do one of the following:
    • On the Home tab, in the Content group, click Report.
    • In the Environments Tree panel, right-click the desired folder, point to New, and click Report.

    The Report Wizard opens.

  2. Follow the prompts to navigate to the desired folder, choose a data source, and click Finish. For more information on the Report Wizard, see How to Create a Report Using the Report Wizard.

    The Report canvas opens.

  3. On the Report tab, in the Report group, click Precision Report.

    A style warning message appears, indicating that the report will be converted to a precision report. Click Yes to close the message and open the Precision Report canvas.

Related Information:



x
The Precision Report Canvas

The Precision Report canvas is similar to the Report canvas but with additional tools and tabs that enable you to match the format of your preprinted form.



x
The Precision Report Canvas Tools Tab

The Precision Report canvas Tools tab contains commands that provide quick access to commonly performed functions. This tab is only available when creating precision reports. The availability of the commands is context-sensitive to the object that is highlighted in the canvas.

The Tools tab contains the Objects and Default Style groups, as shown in the following image.

For more information about using these commands, see Creating Precision Reports.



x
Objects Group

The Objects group contains commands to select and add objects to precision reports, as shown in the following image.

The commands are:

Select Object

Allows you to select (single-click) or edit (double-click) an object.

Tip: Click Select Object after inserting a box, line, image, or text to return to select mode.

Add Box

Allows you to add a box to the Precision Report canvas. When this command is active, the pointer becomes an arrow with a box . Click the canvas to add a box. You can also drag the pointer on the canvas to create a box in the size that you want.

When you add a box, the Default Style group on the Tools tab becomes active with options to set the pen size, line style, fill color, and line color.

Add Line

Allows you to add a line to the Precision Report canvas. When this command is active, the pointer becomes an arrow over a line segment . Drag the pointer on the canvas to create a line and adjust it to the size that you want.

When you add a line, the Default Style group on the Tools tab becomes active with options to set the pen size, line style, fill color, and line color.

Add Image

Allows you to add an image to the Precision Report canvas. When this command is active, the pointer becomes an arrow over a flower . Click the canvas or drag the pointer on the canvas to create a box in the size that you want.

The Open File dialog box opens. Select the desired image and click OK.

Add Text

Allows you to add text to the Precision Report canvas. When this command is active, the pointer becomes an arrow over a letter T . Click the canvas to add a text box. You can also drag the pointer on the canvas to create a text box in the size that you want.

When you add text, the Default Style group on the Tools tab becomes active with options to set the font, size, color, and formatting.

Related Information:



x
Default Style Group

The Default Style group contains commands and options to customize new box, line, and text objects being added to a precision report. The Default Style group is shown in the following image.

Note: The Default Style group commands and options apply to new objects only. To change the style of existing objects, use the Properties tab attributes. For more information, see The Precision Report Canvas Properties Tab.

Pen Size

Sets the default pen size for box and line objects.

Line Style

Sets the default line style for box and line objects. The options are Solid, Dotted, and Dashed.

Color

Sets the default color for box, line, and text box objects.

Fill Color

Sets the default fill color for box and text box objects.

Font Name

Sets the default font type for text boxes. This option is only available for a text box.

Font Size

Sets the default font size for text boxes. This option is only available for a text box.

Bold

Sets bold font formatting as the default for text boxes. This option is only available for a text box.

Italic

Sets italic font formatting as the default for text boxes. This option is only available for a text box.

Underline

Sets underline font formatting as the default for text boxes. This option is only available for a text box.

Defaults

Resets the style settings of the selected object to the default, original style.



x
The Precision Report Canvas Positioning Tab

The alignment commands on the Positioning tab enable you to select multiple objects in the same layer and easily position them relative to one another.

The availability of the commands is context-sensitive to the objects that are selected in the canvas. You cannot select multiple objects in different layers.

The Positioning tab contains the Positioning, Distribution, Options, and Composition groups, as shown in the following image.



x
Positioning Group

The Positioning group contains commands to align the objects on the Precision Report canvas, as shown in the following image.

Align Left

Aligns the selected object to the left of the last object selected.

Align Right

Aligns the selected object to the right of the last object selected.

Align Top

Aligns the selected object to the top edge of the last object selected.

Align Bottom

Aligns the selected object to the bottom edge of the last object selected.

Make Same Width

Makes two or more objects the same width.

Make Same Height

Makes two or more objects the same height.

Make Same Size

Makes two or more objects the same size.



x
Distribution Group

Space Evenly Across

Sets the horizontal spacing between three or more selected objects to be the same.

Tip: To select multiple objects, use the Shift key.

Space Evenly Down

Sets the vertical spacing between three or more selected objects to be the same.



x
Options Group

Grid Options

Sets grid visibility and snap option.

Guide Options

Sets guide visibility and snap option.

Note: These options are applicable when the page ruler is on.



x
Composition Group

Composition Name

Displays a drop-down list of available compositions. You can rename composition names.

Add Composition

Adds a composition. The name of the composition is derived by the system (COMP00).

Remove Composition

Deletes a composition.

Related Information:



x
Precision Report Tabs

The Precision Report canvas is characterized by a window containing multiple tabs. Each tab contains tools that enable you to design and create positioned elements for your precision report. The default tabs are:

These tabs are detailed in the following sections.



x
Reference: The Precision Report Canvas Layers Tab

By default, the Layers tab consists of the Page, Report Heading, Page Header, Data Matrix, Page Footer, and Report Footing layers, as shown in the following image. You can add additional layers as needed.

The Data Matrix layer inserts a placeholder for the reporting data. You can snap objects (boxes, lines, images, text) to the layout.

Layers Tab

The following commands are available on the Layers tab:

Command

Definition

Show/hide Layer

Shows or hides the selected layer in the Precision Report canvas.

Enable/disable styling changes

Enables or disables styling changes.

enable/disablle data changes

Enables or disables data changes.

Enable/disablle all changes

Enables or disables all changes.

Create new layer

Creates a new layer for the precision report.

Delete item

Deletes the selected object or layer. If a layer is deleted, all objects within it are deleted as well.

Move item

Moves the selected object up or down in the selected layer.



x
Reference: The Precision Report Canvas Sort Groups Tab

You can view and modify the sorting properties of fields in the Data Matrix from the Sort Groups tab in the Precision Report canvas, as shown in the following image.

Sort Groups tab

The Sort Groups tab displays the sorting method being applied to each column in the Data Matrix layer. You can change the sorting method (for example, from By to Across or from Detail to Sum) by using the right-click context tab. The changes are reflected in the Columns and Sort Groups tabs and in the Data Matrix layer.

You can also use the Sort Groups tab to create multi-verb requests.



x
Reference: Sort Type Icons

The icons in the first column to the left of the field name display the type of sort field. The icons and their meanings are defined in the following table:

Icon

Definition

Across field.

By field.

Sum field.

Detail field.

For field.



x
Reference: The Precision Report Canvas Columns Tab

You can view and modify the columns in the Data Matrix layer from the Columns tab in the Precision Report canvas, as shown in the following image.

Columns tab

Right-click a column and select Options from the context tab to open the Field Properties dialog box, where you can format and style the column, as well as apply drill-down capabilities. Any changes made to the column properties are reflected in the Data Matrix layer.

Related Information:



x
Reference: The Precision Report Canvas Fields Tab

You can view the fields used in the Data Matrix layer as a:

To change the view, right-click in the Fields tab and choose the view from the context menu.

You can double-click or drag segments or fields from this tab to the Precision Report canvas, where they become report columns.

You can customize how you view the fields list and save your settings. Right-click in the Fields tab and select one of the Save Settings options from the shortcut menu.

You can also search for fields in the fields list. Right-click in the fields tab and select Find Item from the shortcut menu.



x
Reference: The Precision Report Canvas Properties Tab

The Properties tab displays attributes and their editable values, grouped by category, as shown in the following image.

Properties tab

The Properties tab includes attributes such as font, font style, and color that you use to customize existing box, line, and text objects.

Note: The Properties tab attributes apply to existing objects only. To change the style of new objects, use Default Style group commands. For more information, see Default Style Group.



x
Reference: The Precision Report Canvas Navigate Tab

You may view the entire layout of the precision report in the Navigate tab.

Navigate tab

Related Information:



x
Creating Precision Reports

Precision reports are created in the Precision Report canvas by using the Data Matrix layer as the reporting object, and by inserting objects in the other layers as fields.



x
Procedure: How to Build a Report in the Data Matrix Layer
  1. To access the Precision Report canvas for a new report, do one of the following:
    • On the Home tab, in the Content group, click Report.
    • In the Environments Tree panel, right-click the desired folder, point to New, and click Report.

    The Report Wizard opens.

  2. Follow the prompts to navigate to the desired folder, choose a data source, and click Finish. For more information on the Report Wizard, see How to Create a Report Using the Report Wizard.

    The Report canvas opens.

  3. On the Report tab, in the Report group, click Precision Report.

    A style warning message appears, indicating that the report will be converted to a precision report. Click Yes to close the message and open the Precision Report canvas.

  4. If it is not already highlighted, click REGION under the Data Matrix layer in the Layers tab. The REGION object is displayed as a highlighted placeholder in the Precision Report canvas, as shown in the following image.

    Precision Report canvas

  5. Double-click the REGION object in the Precision Report canvas. A hand icon displays, indicating that the region is in selection mode, as shown in the following image.

    Data Matrix layer

  6. Click the Fields tab, as shown in the following image. Select a field for the report, and drag it into the region. Repeat this for all of the desired fields. You may resize the region placeholder as needed.

    Fields tab

  7. Click Save.


x
Procedure: How to Design the Page Layout for Precision Reports

Once the precision report has been built in the Data Matrix layer, you may design the page layout using the Page layer. Objects that you add to the Page layer appear on each page of the report at run time. You may add a box, line, or image to the Page layer.

You can begin this procedure by opening the report you saved from the previous procedure How to Build a Report in the Data Matrix Layer.

  1. From the Layers tab, click the Page layer to toggle to edit mode.
  2. On the Tools tab, in the Objects group, click Add Line.

    The pointer changes to an arrow over a line segment .

  3. Drag the pointer to create a line.

    Change the line color and style on the Tools tab, in the Default Style group.

    Tip: After the line object has been added to the Page layer, you may use the Properties tab to change the appearance of the line.

  4. On the Tools tab, in the Objects group, click Add Image.

    The pointer changes to an arrow over a flower .

  5. Click the canvas or drag the pointer to create a box.

    The Open File dialog appears.

  6. Select the desired image file, such as a company logo, and click OK.

    The image appears on the page. Resize it as needed.

    Note: You can click Select Object to toggle off the Add Image.

    As objects are added to the page layout, they appear under the Page layers, as shown in the following image.

    Page layers

  7. Click Save.

When you run the report, the items added to the Page layer appear on every page of the report output.



x
Procedure: How to Add Heading or Footing Layers in the Precision Report Layout

Once the precision report has been built in the Data Matrix layer, you may add Heading and Footing objects as placeholders for fields on your form.

You can begin this procedure by opening the report you saved from the previous procedure How to Design the Page Layout for Precision Reports.

  1. From the Layers tab, click the Report Footing layer to toggle to edit mode to add an object to the report footing. Similarly, you could select the Report Heading, Page Header, or Page Footer layer.
  2. On the Tools tab, in the Objects group, click Add Box.

    The pointer changes to an arrow over a box .

  3. Click the canvas or drag the pointer to create a box.

    Note: Objects snap to the grid for perfect alignment.

    Change the color and style of the box on the Tools tab, in the Default Style group.

    Tip: After the box object has been added to the Page layer, you may use the Properties tab to change the appearance of the box.

    As items are added, they appear under the Heading/Footing layers, as shown in the following image.

    Heading/footing layers

  4. Click Save.

    Optionally, you can use the Layers tab to move or delete layer objects.



x
Procedure: How to Add Embedded Fields in the Heading/Footing Text Objects

You may embed fields and variables in your Heading/Footing layers as text objects. The precision report retrieves the value for the field when the report is run.

Note: Values for embedded fields are calculated differently in Heading and Footings. Headings use the first value on the page of the report, and Footings use the last value on the page of the report.

You can begin this procedure by opening the report you saved from the previous procedure How to Add Heading or Footing Layers in the Precision Report Layout.

  1. From the Layers tab, click the Report Heading layer to toggle to edit mode to add a text object to the report heading. Similarly, you could select the Page Header, Page Footer, or Report Footing layer.
  2. On the Tools tab, in the Objects group, click Add Text.

    The pointer changes to as an arrow over a letter T .

  3. Click the canvas or drag your pointer to create a box, indicating where you want the text to appear in the canvas. Type the desired text. Place the cursor at the position in the text where you want to embed the value.
  4. Double-click a field from the Fields tab in the Precision Report canvas.

    This includes report variables and computed and defined fields.

    The field is added to the text object as <FIELDNAME.

  5. Optionally, you may also perform a calculation on a field value in the text object:
    1. Highlight <FIELDNAME in the text object.
    2. Right-click and choose Prefix Operators and the desired operator from the context tab.

      Tip: The list of available operators adjusts to show those that are appropriate for the type of field you select.



x
Procedure: How to Control Spacing Between Wrapped Lines

You can use the Wrap Gap option in a style sheet to control spacing between wrapped lines in PDF and PostScript report output. The Wrap Gap option is available only for an active object of type Data.

You can begin this procedure by opening the report you saved from the previous procedure How to Add Embedded Fields in the Heading/Footing Text Objects.

  1. On the Report tab, in the Style group, click the Report Width button. This button is shown in the following image, highlighted by the pointer.

    Style group

  2. The Width Options dialog box opens, as shown in the following image.

    Width Options

  3. From the drop-down menu, click Wrap.
  4. Click the ON radio button to enable the Wrap Gap option.

    Type the number of inches to leave between wrapped lines and click OK.

  5. Click Save.


x
Procedure: How to Run Different Compositions for the Precision Report

You may run the precision report with different composition templates. Composition templates enable you to run the same precision report with different attribute values.

This can be beneficial if you need to run a precision report with modifications for internal and external use. For example, you have an internal report that shows your trademark image in the Report Heading layer. You can create a composition template that hides your trademark image for an external customer.

You can begin this procedure by opening the report you saved from the previous procedure How to Control Spacing Between Wrapped Lines.

  1. On the Positioning tab, in the Composition group, note that DEFAULT is displayed as the Composition Name, as shown in the following image.

    Positioning tab

    This is the composition name given to a precision report when it is created.

  2. To create an additional composition template, click Add Composition. Note the new composition name derived by the system is COMP00. You can rename the composition by typing over the old one in the Composition Name field.
  3. Select the Properties tab and expand the IMAGE section. For the Visible attribute, change the value to No, as shown in the following image.

    Properties tab

  4. Click Save.

    The composition template is added to the selection list. The template in this example hides the image in the precision report. When the report is run under the DEFAULT template, the image will appear. When it is run under the COMP00 template, the image will not appear.

    To delete a composition template, select it from the Composition Name drop-down list and click the Remove Composition command.



Example: Creating a Precision Report

The following example shows how to create a precision report showing Revenue by Vendor and Product Category.

  1. To create a new precision report, do one of the following:
    • On the Home tab, in the Content group, click Report.
    • In the Environments Tree panel, right-click the desired folder, point to New, and click Report.

      The Report Wizard - Select Procedure Location window opens.

  2. Navigate to where you want to create the new procedure and click Next.

    The Report Wizard- Select a master file window opens.

  3. Select a data source in the Master files list. For this example, click wf_retail.mas.

    The Report canvas opens.

  4. On the Report tab, in the Report group, click Precision Report.

    A style warning message appears indicating that the report will be converted to a precision report. Click Yes to close the message and open the Precision Report canvas.

  5. Create a report in the Data Matrix layer:
    1. In the Layers tab, under the Data Matrix layer, click REGION. The region object is displayed as a highlighted square in the Precision Reports canvas.
    2. Click the Fields tab. In the Dimensions folder, expand the Product cube. Expand the Product hierarchy and click Product,Category. Drag it into the region object.
    3. In the Dimensions folder, Product cube, expand the Vendor hierarchy and click Vendor,Business,Region. Drag it into the region object.
    4. In the Measures folder, expand the Sales hierarchy and click Revenue. Drag it into the region object.
    5. Drag the region placeholder to resize the region.
  6. Add a Where clause filter in the report to show only non-zero revenue amounts:
    1. On the Report tab, in the Filter group, click Filter. The Filter drop-down menu opens.
    2. From the drop-down menu, click Where. The Expression Builder opens.
    3. In the Measures folder, expand the Sales hierarchy and double-click Revenue. It now displays in the Column to filter field.
    4. In the Logical Relation drop-down list, click is greater than.
    5. In the Compare Type drop-down list, click Value.
    6. In the Compare Value field, type 0. The filter criteria appears as follows.
    7. Click OK to save the filter and close the Expression Builder. The report will now suppress all rows with zero revenue.
  7. Add a Report Heading layer to the report with text and an embedded field:
    1. Select the Report Heading layer from the Layers tab.
    2. On the Tools tab, in the Objects group, click Add Text. The pointer becomes an arrow over a letter T .
    3. Click the canvas to add a text box. You can also drag the pointer on the canvas to create a text box in the size that you want.

      Note: Use the options in the Default Style group of the Tools tab to select the desired font, size, and style of the text.

    4. Type Revenue by and place the pointer after by.
    5. In the Dimensions folder, Product cube, expand the Vendor hierarchy and double-click Vendor,Business,Region. The field is added to the text object as <Vendor,Business,Region.
  8. Add a Page Header layer to the report:
    1. Click the Page Header layer from the Layers tab.
    2. On the Tools tab, in the Objects group, click Add Line. The pointer changes to an arrow over a line segment .
    3. Drag the pointer on the canvas to create a line below the text added in step 6.
  9. Click Save. The Precision Report canvas will appear similar to the following image.

    Precision Report canvas



x
Editing a Precision Report to Fit a Form

After you create a precision report, you may need to edit the formatting of it to fit perfectly on a preprinted form. The Properties tab of the Precision Report canvas makes it easy to fine-tune the output to match your form.



Example: Matching Output to a Preprinted Form

The following example shows how to edit a precision report to match a preprinted form.

  1. Open the desired precision report. On the Format tab, Output Types group, click Output Format. Click DHTML, PDF, or PS (PostScript).
  2. On the Format tab, Output Types group, click Output Format Options. The Output Format Options dialog box appears, as shown in the following image.

    Output Format Options

  3. Select the option values that will best assist in matching your form and click OK.

    Note: Matching output to your preprinted form is an iterative process that will progress through trial and error.

    Click Save.

  4. Put your preprinted form in your printer and print a single page of output from the precision report. View the results.
  5. Open the precision report. If you need to adjust the alignment of data columns, Open the Properties tab and expand the REGION area. The Position attribute shows four values, as shown in the following image.

    Position values

    • The first number (192 in the example above) controls the left side of the region box.
    • The second number (132 in the example above) controls the top of the region box.
    • The third number (588 in the example above) controls the right side of the region box.
    • The fourth number (276 in the example above) controls the bottom of the region box.

    You can edit the numbers to move the region with great accuracy in matching your form.

    In addition to the REGION attribute, you can also fine tune the TEXT attribute as described above.

  6. Edit the precision report, save it, and print it on your form again until the alignment is correct.

WebFOCUS