Reporting Object Tool

In this section:

How to:

Reporting Objects are stored in folders in the tree within domain folders under the Content folder. They can include selection criteria (WHEREs), JOINs, virtual fields (DEFINEs), filters, and other WebFOCUS statements, as well as reports or charts supplied as templates.

Note: A Reporting Object will not be listed in the tree when the user cannot functionally use the Reporting Object.

The browser Reporting Object tool allows you to create, edit, test, run, or delete a Reporting Object or its components. The main interface, as shown in the following image, consists of a static Quick Launch toolbar, a ribbon of context-sensitive options, and a window that displays the components of the Reporting Object with which you are working.

Browser Reporting Object tool


Top of page

x
Reference: Reporting Object Tool Quick Launch Toolbar

The Reporting Object tool Quick Launch toolbar is a static menu whose commands apply to the entire Reporting Object, not simply to the particular component that you have selected. The following table describes each command in the Reporting Object tool Quick Launch toolbar.

Button

Shortcut Keys

Command

Description

Reporting Object Tool menu Main button

None

Reporting Object tool main menu

Launches a menu allowing you to Save, Save As, Run, and Exit.

Reporting Object Tool menu Save button

Ctrl+S

Save

Saves the Reporting Object.

Reporting Object Tool menu Undo button

Ctrl+Z

Undo

Undoes the last action.

Reporting Object Tool menu Redo button

Ctrl+Y

Redo

Repeats the last action.

Reporting Object Tool menu View Code button

None

View code

Displays Reporting Object code in a read-only window.

Reporting Object Tool menu Runbutton

Ctrl+R

Run

Runs the Reporting Object.



x
Reference: Reporting Object Tool Ribbon

The Reporting Object tool ribbon is a menu whose commands apply to what you have selected, whether that is the Reporting Object as a whole, a particular component, or an individual example of a component. For example, a particular filter or filter group, if you have selected one, rather than selecting the entire Filter component.

The following table describes each command on the Reporting Object tool ribbon.

Button

Command

Description

New

Creates a new join, DEFINE statement, filter, or WHERE statement.

Reporting Object Tool Ribbon New button

Open

Launches InfoAssist to create or edit a report or chart, or launches the appropriate tool to create or edit a join, DEFINE statement, filter, or WHERE statement.

Reporting Object Tool Ribbon Edit button

Edit

Opens component source code in the text editor.

Reporting Object Tool Ribbon Properties button

Properties

Renames the selected filter or filter group.

Reporting Object Tool Ribbon Run button

Run

Runs the selected component.

Reporting Object Tool Ribbon Delete button

Delete

Deletes the selected item.

Reporting Object Tool Ribbon Delete All button

Delete All

Deletes all items of the type selected, for example, all WHERE statements, all filters in a particular group, or all filters in every group if the Filter component itself is selected.



x
Properties of a Reporting Object

To view or edit the properties of a Reporting Object, right-click the object and select Properties. The Reporting Object Properties dialog box opens, as shown in the following image.

Reporting Object Properties - Main Properties

In the Properties dialog box, the Main Properties tab displays information, such as the parent folder (location), file name, size, status, and run option of the object, along with the user and date of the creation, last access, and last modification of the object. Authorized users can edit the title, name, and sort order, and select the following options that control how the Reporting Object will be run or accessed:

Authorized users can view or edit the access rules, effective policy, or sharing permissions by clicking Security.

The Server Properties tab, shown in the following image, allows you to manage the server and application path settings.

Reporting Objects properties Server Properties tab

To change the server, check Assign Server and select one of the available servers. Move application paths from the Available box to the Selected box by double-clicking them or by selecting them and using the movement arrows. Use the up and down arrows to change the preferred order of the application paths.

The Details tab, as shown in the following image, allows you to see the Master Files, data elements, sorts, conditions, expressions, output formats, and joins used by the Reporting Object.

Reporting Object properties  Details tab


Top of page

x
Procedure: How to Create a Reporting Object
  1. Open the browser and navigate to the folder that will contain the Reporting Object.
  2. If the folder that will contain the Reporting Object already exists, proceed to step 4. Otherwise, create the folder by right-clicking an existing folder in the tree and selecting New, then Folder. Alternatively, right-click Content and select New Folder to create the folder directly under the root.

    The New Folder dialog box opens.

  3. Type the name of the Reporting Objects folder, optionally select a server and an application path, and click Create.

    If you do not select a server or an application path, each is set to the default server and application paths for your WebFOCUS installation. For more information, see the Managed Reporting manual.

  4. Right-click the folder that will contain the Reporting Object, and select New, then Reporting Object.

    The Tool Setup dialog box opens, as shown in the following image.

    Tool Setup dialog box

  5. Click OK to accept the default settings for the server and application path, or change the settings and click OK to proceed.

    The Open dialog box opens, prompting you to select a Master File, as shown in the following image.

    Select a Master File dialog box

  6. Select a Master File and click OK.

    The Reporting Object tool appears.


Top of page

x
Procedure: How to Edit a Reporting Object

Right-click the Reporting Object and select Edit.

Note: Double-clicking the Reporting Object runs the Reporting Object rather than allowing you to edit it.


Top of page

x
Procedure: How to Save a Reporting Object
  1. Press Ctrl+S or click the Save Save Reporting Object button icon on the Quick Launch toolbar.

    The Save dialog box opens.

  2. Type the name of the new Reporting Object in the Title field and click OK.

    From now on, clicking Save or pressing Ctrl+S saves the Reporting Object without launching the Save dialog box.


Top of page

x
Running a Reporting Object From the Browser

In this section:

You can run a Reporting Object or any individual component of it from the browser. You can run a Reporting Object in the following ways:

The Run option in the Reporting Object tool is enabled regardless of the setting of the Only Run as a Deferred Report property.



x
Expected Behavior of Running a Reporting Object

When you select and run a Reporting Object, the expected behavior is as follows:


Top of page

x
Components of a Reporting Object

A Reporting Object may contain any of the following types of components, which are run in the order of precedence, as listed:

Users using the Reporting Object to create a report do not see the DEFINE statements, WHERE statements, or JOIN commands defined in the Reporting Object, which are issued automatically every time a user accesses the Reporting Object. However, the report or chart components, including headers, footers, and styling features, are visible to authorized users who can use them to create their own customized report.

The filters defined in the Filter component are applied only if the user of the Reporting Object activates them when the report or chart based on the Reporting Object is run.


Top of page

x
Preprocessing Other Component

Reference:

The Preprocessing Other component contains custom code that must run before all other components. You can use the text editor in the component to create and edit code or to paste the code that you have copied from another application.

To create or edit a Preprocessing Other component, do one of the following:

The Preprocessing Other text editor appears.

See the Creating Reports With WebFOCUS Language manual for more information about using the WebFOCUS language to code procedures.

Note:



x
Reference: Considerations for Amper Auto Prompting With the Preprocessing and Postprocessing Other Components

When using Amper Auto prompting, users may be prompted to supply amper variable values for parameters that the private user content does not reference. These scenarios are directly related to the internal processing of reports created using a Reporting Object.

Auto prompting considerations and expected behavior must be understood when referencing amper variables within a Reporting Object. For information on the Amper Auto prompting facility, see the Developing Reporting Applications manual. The specification of values for the amper variables in the Reporting Object Other component using –DEFAULT, –DEFAULTH, or –SET commands will assign a default value for amper variables in a report request to avoid a FOC error for not specifying a value. A consideration for –DEFAULTH and –SET is that Amper Auto prompting does not prompt for amper variables that have values assigned using –DEFAULTH and –SET.

Whether a user is prompted by the Amper Auto prompting facility for amper variables assigned a default value using the –DEFAULT command is dependent on the setting of the WebFOCUS Client configuration parameter, IBIMR_prompting. When IBIMR_prompting is set to XMLPROMPT, users are prompted for amper variable values, and default values are displayed in fields in which the default values have been specified. When IBIMR_prompting is set to XMLRUN, users are not prompted for values when all amper variables have been assigned a default value. For more information on setting the IBIMR_prompting parameter, see the WebFOCUS Security and Administration manual.



x
Reference: Creating a Reporting Object That Uses a HOLD File

Suppose that your company has a data warehouse and you need a Reporting Object that uses an extract from that data warehouse. In your Preprocessing Other component, you create a HOLD file from the data warehouse, and then you use that HOLD file in each Reporting Object component. You can clear the JOIN command and delete the HOLD file in the Postprocessing Other component so that it is not mistakenly used again the next time that the Reporting Object is used.

This task has the following steps:

  1. Create a HOLD file in the Preprocessing Other component.
  2. Create a new Join component with two joins.
  3. Use the Report component to create a new report in InfoAssist.
  4. Clear the JOIN command and delete the HOLD file in the Postprocessing Other component.
  5. Run the Reporting Object, and then view the object source to verify that the output is correct.
  6. Verify that the HOLD file does not exist in the location in which it was created.


Example: Creating a HOLD File With the Preprocessing Other Component
  1. Create a Reporting Object with the BASEAPP and IBISAMP selected as the application paths and the EMPLOYEE table selected as the MASTERFILE.

    For more information on creating a Reporting Object, see Properties of a Reporting Object.

  2. Select the Preprocessing Other component and click Edit.
  3. Type the following code:
    APP HOLD IBISAMP
    TABLE FILE EMPLOYEE
    PRINT EMPLOYEE.EMPINFO.DEPARTMENT AS 'NEWDEP'
    EMPLOYEE.EMPINFO.CURR_SAL AS 'NEWCURR_SAL'
    BY EMPLOYEE.EMPINFO.EMP_ID AS 'EMP_ID'
    BY EMPLOYEE.EMPINFO.HIRE_DATE AS 'NEWHIRE_DATE'
    ON TABLE HOLD AS WINFILE FORMAT FOCUS INDEX EMP_ID
    END
  4. Click Save, and then close the text editor.
  5. To verify that the component works properly, select the Preprocessing Other component and click Run.

    The following output is produced:

    0 NUMBER OF RECORDS IN TABLE= 12 LINES= 12


Example: Creating a New Join Component With Two Joins
  1. Select the Join component and click New.

    The Join component is prefilled with the EMPLOYEE table.

  2. Click Add New, select the WINFILE table, and click OK.
  3. Click the Add New button, select the JOBFILE table, and click OK.
  4. Click OK to close the Join tool, saving your changes.
  5. Click View Code in the Reporting Object Quick Launch toolbar to review the code.

    The following code for the Join component is displayed:

    -*COMPONENT=Join_J001
    JOIN EMPLOYEE.EMPINFO.EMP_ID IN EMPLOYEE
    TO MULTIPLE WINFILE.SEG01.EMP_ID IN WINFILE TAG J001 AS J001
    END
    -*COMPONENT=Join_J002
    JOIN EMPLOYEE.PAYINFO.JOBCODE IN EMPLOYEE
    TO MULTIPLE JOBFILE.JOBSEG.JOBCODE IN JOBFILE TAG J002 AS J002
    END


Example: Creating a Report With the Report Component
  1. Double-click the Report component.

    InfoAssist is launched.

  2. Drag NEWCURR_SAL from the Measures in the Data box to the canvas, and select Drop as sum.
  3. Drag EMP_ID from the Dimensions in the Data box to the left of the NEWCURR_SAL column in the canvas, and select Drop as sort.
  4. Drag NEWHIRE_DATE from the Dimensions in the Data box to the left of the NEWCURR_SAL column in the canvas, and select Drop as sort.
  5. Drag NEWDEP from the Dimensions in the Data box to the left of the NEWCURR_SAL column in the canvas, and select Drop as sort.

    The report is displayed as a table with four columns, sorted by EMP_ID.

  6. Save the report and exit InfoAssist.
  7. To verify that the component works properly, click Run on the Quick Launch toolbar.

    The report that you created in InfoAssist is displayed in the browser.



Example: Deleting the Join in the Postprocessing Other Component
  1. Select the Postprocessing Other component and click Edit.
  2. Type the following:
    JOIN CLEAR *
    ? JOIN
  3. Click Save, and then click Exit.
  4. To verify that the Reporting Object works properly, click Run on the Quick Launch toolbar.

    The report that you created in InfoAssist is displayed in the browser.

  5. Right-click the report webpage and select View source.
  6. Scroll to the bottom of the source window.

    The following comment is displayed:

    <!--
    0 NUMBER OF RECORDS IN TABLE= 12 LINES= 12
    0 NUMBER OF RECORDS IN TABLE= 12 LINES= 12
    0 HOLDING HTML FILE ON PC DISK ...
    JOINS CURRENTLY ACTIVE
    HOST                           CROSSREFERENCE
    FIELD        FILE      TAG     FIELD     FILE      TAG AS ALL WH
    -----        ----      ---     -----     ----      --- -- --- --
    EMPLOYEE.EM&gt;EMPLOYEE        WINFILE.SEG&gt; WINFILE J0 J0 Y N
    EMPLOYEE.PA&gt;EMPLOYEE        JOBFILE.JOB&gt; JOBFILE J1 J1 Y N
    0 NO JOINS CURRENTLY IN EFFECT
    -->


Top of page

x
Joins

How to:

A join is a temporary connection between two or more data sources that share at least one common field. After you join two data sources, each time that WebFOCUS retrieves a record from the first data source (the host file), it also retrieves the matching records from the second data source (the target file).

For more information on joining data sources, see the WebFOCUS InfoAssist User’s Manual.

Note:



x
Procedure: How to Create a Join
  1. Right-click the Joins component and select New, or select the Join component and click New on the ribbon.

    The Join tool opens, displaying the data source associated with the Reporting Object.

  2. Create a join using the Join tool.

    For more information on using the Join tool, see Join Group in the WebFOCUS InfoAssist User’s Manual.

  3. When you are finished, click OK to return to the Reporting Object tool.


x
Procedure: How to Delete a Join

To delete a join, right-click the join and select Delete, or select the join and click Delete on the Quick Launch toolbar.



x
Procedure: How to Rename a Join
  1. In the Join tool, select a join by clicking its connector line, and then click Edit on the Join toolbar.

    The Edit Join dialog box opens.

  2. Type a new description in the Description box and click OK to return to the Join tool.

    The new description appears under the Join component in the Reporting Object tool. The internal name used for the join remains the same name assigned to the join when you created it.



x
Procedure: How to View or Edit Join Syntax in a Text Editor
  1. Select the join and click Edit on the ribbon, or right-click the join and select Edit.

    The join code is displayed in a text editor.

  2. Make the desired changes and click Save to return to the Reporting Object tool. To exit without making any changes, click Close.

Top of page

x
Virtual Fields (DEFINE Statements)

How to:

A virtual field is a field whose value is not stored in the data source but can be calculated from the data that is there. A virtual field takes up no storage space. It is created only when a user accesses the Reporting Object that includes the virtual field.

You use the Define tool to create a virtual field. Using this tool, you specify the virtual field name and format, and the expression that defines the field. An expression enables you to combine fields, constants, predefined functions, and operators into an operation that produces a single value. When you define a virtual field, you must specify a field format type, length, and appropriate display options.

For more information about defining fields, see Data Tab in the WebFOCUS InfoAssist User’s Manual.



x
Procedure: How to Create a Virtual Field
  1. Right-click the Defines component and select New, or select the Define component and click New on the ribbon.

    The Define tool dialog box opens, as shown in the following image.

    The Define tool

  2. Create a virtual field using the Define tool.

    For more information about the Define tool, see Data Tab in the WebFOCUS InfoAssist User’s Manual.

  3. Click OK to save the virtual field and return to the Reporting Object tool.

    The virtual field now appears in the field list when a user accesses this Reporting Object.

Note:



x
Procedure: How to Edit a Virtual Field

Existing virtual fields appear under the Defines node, as shown in the following image.

  1. Right-click the virtual field that you want to edit and select Open, or select the virtual field and click Open on the ribbon.

    The Define tool dialog box opens, displaying the selected field.

  2. Make changes to the field name, expression, or format, and click OK to return to the Reporting Object tool.


x
Procedure: How to View or Edit a Virtual Field in the Text Editor
  1. Right-click the virtual field that you want to view or edit as text and select Edit, or select the virtual field and click Edit on the ribbon. The Text Editor opens, displaying the selected field.
  2. Make changes to the field name, expression, or format, and click OK to return to the Reporting Object tool.


x
Procedure: How to Delete a Virtual Field
  1. Right-click the virtual field that you want to delete and select Delete, or select the virtual field and click Delete on the ribbon.
  2. To delete all virtual fields at once, right-click the Defines component and select Delete All, or select the component and click Delete All on the ribbon.

Top of page

x
Filters

How to:

Reference:

Filters enable users to quickly select predefined criteria that limit the data included in a report or chart. Filters are selection criteria (WHERE statements) that you create for users, who then select the filters needed to limit the data in a report or chart without having to create their own selection criteria.

In order to create a filter, you must create the filter group and define the filters that make up the group.

Note: The Undo and Redo functions are not available for the Filter component until you have created at least one filter.

For more information about filters, see Filter Group in the WebFOCUS InfoAssist User’s Manual.



x
Procedure: How to Create a Filter Group
  1. Right-click the Filters component and select New, or select the Filter component and click New on the ribbon.
  2. In the Filter Group Name box, type a descriptive name for the filter group folder.

    Make the filter group name as explicit as possible, because users depend on this name to select the correct filter to apply to their reports.

  3. Click OK.

    You are returned to the Reporting Object tool. The filter group folder appears below the Filter component node.



x
Procedure: How to Define a Filter
  1. Right-click the Filter group to which you would like to add a filter and select New, or select the Filter group folder and click New on the Quick Launch toolbar.

    The New Filter dialog box opens.

  2. In the Filter Name box, type a descriptive name for the filter and click Add New if you plan to create multiple filters, or click OK if you plan to create only one filter.

    Make the filter names as explicit as possible, because users depend on these names to select the correct filter to apply to their reports.

    The Advanced Filter dialog box opens, as shown in the following image.

    Create a filtering condition dialog box

  3. Use the Advanced Filter dialog box to create the filter.

    For more information about defining filters, see Data Tab in the WebFOCUS InfoAssist User’s Manual.

  4. When you have created the filter, click OK.

    If you clicked Add new in step 2, the New Filter dialog box opens. If you clicked OK in step 2, you are returned to the Reporting Object tool.



x
Procedure: How to Edit a Filter

Existing filters appear under the Filter group beneath the Filters node, as shown in the following image.

  1. Right-click the filter that you want to edit and select Open, or select the filter and click Open on the ribbon.

    The Advanced Filter dialog box opens, displaying the selected filter.

  2. Make your changes and click OK to return to the Reporting Object tool.


x
Procedure: How to Rename a Filter or Filter Group
  1. Right-click the filter or filter group that you want to rename and select Properties, or select the filter or filter group and click Properties on the ribbon.
  2. Type the new filter or filter group name in place of the current one and click OK.


x
Procedure: How to Delete a Filter or a Filter Group
  1. Right-click the filter or filter group that you want to delete and select Delete, or select the filter or filter group and click Delete on the ribbon.
  2. To delete all filters at once, right-click the Filter component and select Delete All, or select the component and click Delete All on the ribbon.


x
Procedure: How to View or Edit a Filter in the Text Editor
  1. Right-click the filter that you want to view or edit as text and select Edit, or select the filter and click Edit on the ribbon.

    The text editor opens, displaying the selected filter.

  2. Make your changes and click OK to return to the Reporting Object tool.


x
Reference: Filter Considerations With Amper Auto Prompting

When Amper Auto prompting is used (Prompt for Parameters is selected in the Reporting Object properties), there are scenarios in which users are prompted to provide amper variable values in selection criteria (WHERE statements) in the Reporting Object that the user did not save with the report. This is due to the internal processing of reports created from Reporting Objects. You can avoid this issue by using the Filter component to predefine selection criteria for users to include in reports. Only the filter or filters that users select for inclusion in their reports are evaluated by the WebFOCUS Amper Auto prompting facility.


Top of page

x
Selection Criteria (WHERE Statements)

How to:

WHERE statements or selection criteria, restrict the data retrieved to only those records that meet the conditions that you specify. Filters are selection criteria that run when the user selects the filter in WebFOCUS. Other selection criteria run when the user opens the Reporting Object, preventing data values that do not meet the criteria from being available to the user.

For more information on WHERE statements, see Field Tab in the WebFOCUS InfoAssist User’s Manual.



x
Procedure: How to Create Selection Criteria
  1. Right-click the Where Statements component and select New, or select the component and click New on the ribbon.

    The New Filter dialog box opens, as shown in the following image.

    New Filter dialog box

  2. Double-click the red text or press F12 to edit the WHERE statement.

    For more information on creating selection criteria, see the Filter Group in the WebFOCUS InfoAssist User’s Manual.

  3. When you have created the selection criterion, click OK to return to the Reporting Object tool.

Top of page

x
Report Component

The Report component creates a report template and saves it in a Reporting Object. Authorized users can use the report template to create a report that suits their needs and then save the new report.

To create a report template, double-click the Report component, or right-click the component and select Open. InfoAssist opens, allowing you to create a report template.

For more information on using InfoAssist, see the WebFOCUS InfoAssist User’s Manual.

Note:


Top of page

x
Chart Component

The Chart component works exactly like the Report component. The Chart component creates a chart template and saves it in a Reporting Object. Authorized users can use the chart template to create a chart that suits their needs and then save the new chart.

To create a chart template, double-click the Chart component, or right-click the component and select Open. InfoAssist opens, allowing you to create a chart template.

For more information on using InfoAssist, see the WebFOCUS InfoAssist User’s Manual.

Note:


Top of page

x
Postprocessing Other Component

The Postprocessing Other component contains custom code that must run after all other components. You can use the text editor in the component to create and edit code, or to paste the code that you have copied from another application.

To create or edit a Postprocessing Other component, double-click the component, or select the component and click Editon the ribbon. Alternatively, right-click the component and select Edit. The Postprocessing Other dialog box opens.

See the Creating Reports with the WebFOCUS Language manual for more information about using the WebFOCUS language to code procedures.

Note:


WebFOCUS