Working With the Global Filter Feature

In this section:

You can apply one or more filters to all the active reports and active charts on an active dashboard. This is called global filtering. When you apply global filtering to an active dashboard, you present the selected data in a single analytical view.


Top of page

x
Populating the Global Filter Drop-Down List

In Document Composer, when you set the Output format property to active report and the Coordinate report property to On for a compound document, WebFOCUS generates a drop-down list at the top of the window when you run the active dashboard. The drop-down list contains values from which you can select.

WebFOCUS builds the list of values from the first BY field in the first report on the active dashboard. If the user selects a value from the list, WebFOCUS filters any report on the active dashboard that contains the BY field, whether or not it is the first BY field in the procedure. The BY field in the other reports can be visible or hidden.

WebFOCUS generates the drop-down list even if there are multiple tabs on the active dashboard.

When you build an active dashboard, follow these best practices to populate the drop-down list.



Example: Populating the Global Filter Drop-Down List

In Document Composer, the Output format property is set to active report and the Coordinate report property is set to On for a sample compound document.

Assume that the first report on an active dashboard is a pie chart with the following code:

TABLE FILE CENTURYSALES
SUM LINEPRICE
BY COUNTRY
BY REGION
.
.
.
END

The second report on the active dashboard is a bar chart with this code.

TABLE FILE CENTURYSALES
SUM REGION
BY STATE
BY COUNTRY
.
.
.
TYPE=REPORT,
   COLUMN=COUNTRY,
   HIDE=ON,
$
ENDSTYLE
END

When you run the active dashboard, WebFOCUS automatically generates a drop-down list with the values for COUNTRY because COUNTRY is the first BY field in the first report. The following image shows the drop-down list at the top of the window.

Automatic drop-down list for Country

The value selected from the drop-down list filters both reports because COUNTRY is also a BY field in the second report. COUNTRY is a hidden field in the second report. The following image shows the filtered output after you select United States from the drop-down list.

Filtered output after selecting United States from drop-down list

As shown in the following image, you can now filter the pie chart only on REGION because the chart is already filtered on COUNTRY from the drop-down list.


Top of page

x
Using the Global Filter Icon

When you run an active dashboard, you can apply a global filter to all the reports on the dashboard, using the Global Filter icon. The Global Filter icon is located at the top of an active dashboard, to the right of the drop-down lists from which you select field values.

For information on suppressing the display of the Global Filter icon, see Controlling the Display of the Global Filter Icon and Dashboard Bar.

When you click the Global Filter icon, the Global Filter dialog box opens. For instructions on using that dialog box, see Applying a Global Filter to a Tabular Report.

On the Add Condition button on the Global Filter dialog box, only the fields that are common to the active reports on the active dashboard are listed. This feature enables you to quickly identify, select, and filter on a field that is used in all reports.

In the following image, the common field Revenue is selected on the Add Condition button on the Global Filter dialog box.

Global Filter dialog box with common fields

Selecting from a list of fields is an alternative to selecting a field that is graphically represented on a bar chart, pie chart, or line chart. Selecting from a list of common fields ensures that you can make meaningful data comparisons on the active dashboard.


Top of page

x
Using the HIDE StyleSheet Feature

In this section:

Assume that you have an active dashboard with three charts (pie, line, and bar) and one tabular report.

For the sample procedures that produce the filtering results described in this topic, see Pie Chart Procedure, Line Chart Procedure, Bar Chart Procedure, and Tabular Report Procedure. You may want to refer to the procedures as you read this topic.

On the pie chart, you want to filter the data using Product Type=Camcorders, as shown in the following image. You also want to apply that filter to all the other active reports on the active dashboard to create a single perspective of the data.

Filtering on Product Type=Camcorders

In order for one report to filter a second report, the filtered field in the first report must also be present in the second report.

The field Product Type is present in the procedure for the pie chart as a BY field (PRODUCTTYPE). It is also present in the procedure for the tabular report as a BY field. As a result, WebFOCUS updates the pie chart and the tabular report with the filter when you run the active dashboard.

However, if the field PRODUCTTYPE is not present in the procedure for the line chart or the bar chart, WebFOCUS does not update the line chart or the bar chart with the filter when you run the active dashboard.

The image that follows shows the result of the filter Product Type=Camcorders. WebFOCUS updates the pie chart with the filter, and the value Camcorders is now 100% in the pie chart. WebFOCUS also updates the tabular report with the filter, and Camcorders is now the only value that is displayed in the Product Type column. The pie chart and the tabular report are updated because the procedure for each one contains the filtered field.

WebFOCUS does not update the line chart or the bar chart because neither procedure contains the filtered field. The field Product Type is not used on either axis of the line chart or the bar chart.

Updating the pie chart in a dashboard

To filter the line chart and the bar chart using Product Type=Camcorders, you must add the field Product Type to the procedures for those charts. You can add the field Product Type as a hidden field in both the line chart procedure and the bar chart procedure.

When you run the active dashboard and select the filter Product Type=Camcorders, the following is generated.

Updating the line chart and the bar chart

Notice that the line chart and the bar chart are now updated with the filter Product Type=Camcorders, even though the field is not displayed in either chart. PRODUCTTYPE is a BY field in the line chart procedure and the bar chart procedure. Since the field is desired only for filtering and not for display, it is hidden in the StyleSheet code of both procedures.

You can filter each active report on the following fields and values:

The result of the filtering selections is shown in the following image. All the active reports on the active dashboard are filtered with the preceding fields and values.

Filtering on three fields



x
Removing a Global Filter

On an active dashboard, you can remove a global filter from all the reports that were updated with that filler. The reports are restored to their previous state.



x
Procedure: How to Remove a Global Filter
  1. Display the active dashboard in the browser.
  2. Click the right-most icon above the chart from which you globally filtered the reports on the active dashboard.

    In the following image, the cursor above the bar chart points to the correct icon.

    Icon that removes a global filter

    WebFOCUS removes the global filter from all the applicable reports.



x
Global Filtering Rules for Charts

The following global filtering rules apply to charts on an active dashboard. Notice that the rules for charts are different from the rules for tabular reports.


Top of page

x
Applying a Global Filter to a Tabular Report

In this section:

How to:

You can also perform global filtering with the Global Filter option on a column pop-up menu on a tabular report. See Global Filtering Rules for Tabular Reports for a list of the rules that apply to filtering a tabular report.



x
Procedure: How to Apply a Global Filter to a Tabular Report With the Global Filter Menu Option
  1. Click a column control on a tabular report, and select Global Filter from the pop-up menu, as shown in the following image.

  2. On the Global Filter dialog box, do one of the following:
    • Accept the default operator AND.
    • Click Operator: AND to display and select the operator OR.
  3. On the Add Condition button, specify the field on which to filter.

    The list of fields from which you can choose contains fields that are common to all the active reports on the active dashboard.

    In the following image, the field State is selected.

    Global Filter menu option

  4. Select the operator and the field value from the available drop-down lists.

    In the following image, the operator Equals is selected from the first drop-down list, and the field value Kentucky is selected from the second drop-down list.

    Filtering globally on the State of Kentucky

  5. Click Filter to run the active dashboard.

    The following image shows the result of the preceding global filtering selection. Note that Kentucky is the only state that is displayed in the tabular report.

  6. Optionally, click:
    • Highlight to highlight the values in a report that meet the filter criteria. This feature is available for active dashboards with format AHTML.
    • Clear All to remove all existing filters from the active dashboard.


x
Global Filtering Rules for Tabular Reports

The following global filtering rules apply to tabular reports on an active dashboard. Notice that the rules for tabular reports are different from the rules for charts.


Top of page

x
Designating a Hidden Field in Report Painter

How to:

Reference:

When you develop an active report in Report Painter, you can specify that a field in the report is hidden. WebFOCUS generates the correct HIDE Style Sheet code so that you do not need to manually type it.

To enable this option, set the output format of the report to one of the active report format types.



x
Procedure: How to Designate a Hidden Field in Report Painter
  1. Open the active report in Report Painter.
  2. Right-click the field that you want to hide, and select Options from the pop-up menu.

    The Field Properties dialog box is displayed, as shown in the following image.

  3. In the active reports section, select the check box that is labeled Present Hidden.
    WebFOCUS adds the appropriate HIDE StyleSheet code to the report procedure.


x
Reference: Usage Notes for Report Painter

The Actions tab is accessible from the Sort tab on the Field Properties dialog box for a vertical sort field. The following menu options on the Actions tab are not available for the Active Technologies output formats AHTML, FLEX, and APDF: Fold Line, Page Break, and Restart Page Numbering.


Top of page

x
Procedures

Reference:

In the example, all procedures include the same SUM and BY fields.

TABLE FILE CENTURYSALES
SUM
     'CENTURYSALES.ORDERS.LINEPRICE' AS 'Revenue'
     'CENTURYSALES.PRODSEG.PROFIT'
     'CENTURYSALES.PRODSEG.COSTOFGOODSSOLD'
     'CENTURYSALES.ORDERS.QUANTITY' 
BY 'CENTURYSALES.STORESEG.COUNTRY' 
BY 'CENTURYSALES.STORESEG.REGION' 
BY 'CENTURYSALES.STORESEG.STATE' 
BY 'CENTURYSALES.STORESEG.STORENAME' 
BY 'CENTURYSALES.PRODSEG.PRODUCTTYPE'
.
.
.

All the procedures use the following filter and record limitation to more easily show the result of a filtering selection, with a manageable number of items in the charts.

WHERE COUNTRY EQ 'United States' OR 'France';
WHERE RECORDLIMIT EQ 500;

In the HIDE StyleSheet code for each of the four active reports, different fields are hidden while others are commented. A hidden field is available for use in the global filter. A line that is commented in a StyleSheet is ignored, resulting in the display of a field.

Tip: When you develop an active report in Report Painter, you can specify that a field is hidden on the Field Properties dialog box. For instructions on using that option, see Designating a Hidden Field in Report Painter.

In the example, all active reports on the active dashboard have the same primary sort (BY) field, which is COUNTRY.

BY 'CENTURYSALES.STORESEG.COUNTRY'

When you run the active dashboard, WebFOCUS automatically builds a drop-down list that contains the possible values for COUNTRY. In the sample output throughout the example, the user selected United States as the value for COUNTRY.

For more information on the drop-down list and development recommendations, see Populating the Global Filter Drop-Down List.

In the following image, the selected value (United States) for the primary sort field (COUNTRY) is shown in the tab at the upper-left of the window.

Automatic drop-down list for Country



x
Reference: Pie Chart Procedure
-* File CentSalesChartZero.fex
TABLE FILE CENTURYSALES 
SUM
     'CENTURYSALES.ORDERS.LINEPRICE' AS 'Revenue'
     'CENTURYSALES.PRODSEG.PROFIT'
     'CENTURYSALES.PRODSEG.COSTOFGOODSSOLD'
     'CENTURYSALES.ORDERS.QUANTITY' 
BY 'CENTURYSALES.STORESEG.COUNTRY' 
BY 'CENTURYSALES.STORESEG.REGION' 
BY 'CENTURYSALES.STORESEG.STATE' 
BY 'CENTURYSALES.STORESEG.STORENAME' 
BY 'CENTURYSALES.PRODSEG.PRODUCTTYPE' 
HEADING 
"" 
FOOTING 
"" 
WHERE COUNTRY EQ 'United States' OR 'France'; 
WHERE RECORDLIMIT EQ 500; 
ON TABLE SET PAGE-NUM OFF 
ON TABLE NOTOTAL 
ON TABLE PCHOLD FORMAT AHTML 
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT, 
$ 
TYPE=REPORT,
     GRID=OFF,
     FONT='ARIAL',
     SIZE=9,
     LINES-PER-PAGE=20,
     REPORT-VIEW=CHART,
     CHART-TYPE=PIE,
$ 
-*TYPE=REPORT, COLUMN='CENTURYSALES.ORDERS.LINEPRICE',HIDE=ON, $ 
TYPE=REPORT, COLUMN='CENTURYSALES.PRODSEG.PROFIT',HIDE=ON, $ 
TYPE=REPORT, COLUMN='CENTURYSALES.PRODSEG.COSTOFGOODSSOLD',HIDE=ON, $ 
TYPE=REPORT, COLUMN='CENTURYSALES.ORDERS.QUANTITY',HIDE=ON, $ 
-*TYPE=REPORT, COLUMN='CENTURYSALES.STORESEG.COUNTRY',HIDE=ON, $ 
TYPE=REPORT, COLUMN='CENTURYSALES.STORESEG.REGION',HIDE=ON, $ 
TYPE=REPORT, COLUMN='CENTURYSALES.STORESEG.STATE',HIDE=ON, $ 
TYPE=REPORT, COLUMN='CENTURYSALES.STORESEG.STORENAME',HIDE=ON, $ 
-*TYPE=REPORT, COLUMN='CENTURYSALES.PRODSEG.PRODUCTTYPE',HIDE=ON, $
TYPE=TITLE,
     STYLE=BOLD, 
$ 
TYPE=TABHEADING,
     SIZE=12,
     STYLE=BOLD, 
$ 
TYPE=TABFOOTING,
     SIZE=12,
     STYLE=BOLD, 
$ 
TYPE=HEADING,
     SIZE=12,
     STYLE=BOLD, 
$ 
TYPE=FOOTING,
     SIZE=12,
     STYLE=BOLD, 
$ 
TYPE=SUBHEAD,
     SIZE=10,
     STYLE=BOLD, 
$ 
TYPE=SUBFOOT,
     SIZE=10,
     STYLE=BOLD, 
$ 
TYPE=SUBTOTAL,
     BACKCOLOR=RGB(210 210 210), 
$ 
TYPE=ACROSSVALUE,
     SIZE=9, 
$ 
TYPE=ACROSSTITLE,
     STYLE=BOLD, 
$ 
TYPE=GRANDTOTAL,
     BACKCOLOR=RGB(210 210 210),
     STYLE=BOLD, 
$ 
ENDSTYLE 
END


x
Reference: Line Chart Procedure
-* File CentSalesChartOne.fex 
TABLE FILE CENTURYSALES
SUM
     'CENTURYSALES.ORDERS.LINEPRICE' AS 'Revenue'
     'CENTURYSALES.PRODSEG.PROFIT'
     'CENTURYSALES.PRODSEG.COSTOFGOODSSOLD'
     'CENTURYSALES.ORDERS.QUANTITY' 
BY 'CENTURYSALES.STORESEG.COUNTRY'
BY 'CENTURYSALES.STORESEG.REGION'
BY 'CENTURYSALES.STORESEG.STATE' 
BY 'CENTURYSALES.STORESEG.STORENAME'
BY 'CENTURYSALES.PRODSEG.PRODUCTTYPE'
HEADING 
""
FOOTING
""
WHERE COUNTRY EQ 'United States' OR 'France';
WHERE RECORDLIMIT EQ 500;
ON TABLE SET PAGE-NUM OFF 
ON TABLE NOTOTAL 
ON TABLE PCHOLD FORMAT AHTML 
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT, 
$ 
TYPE=REPORT,
     GRID=OFF,
     FONT='ARIAL',
     SIZE=9,
     LINES-PER-PAGE=20,
     REPORT-VIEW=CHART,
     CHART-TYPE=LINE,
$
-*TYPE=REPORT, COLUMN='CENTURYSALES.ORDERS.LINEPRICE',HIDE=ON, $ 
TYPE=REPORT, COLUMN='CENTURYSALES.PRODSEG.PROFIT',HIDE=ON, $ 
TYPE=REPORT, COLUMN='CENTURYSALES.PRODSEG.COSTOFGOODSSOLD',HIDE=ON, $ 
TYPE=REPORT, COLUMN='CENTURYSALES.ORDERS.QUANTITY',HIDE=ON, $
-*TYPE=REPORT, COLUMN='CENTURYSALES.STORESEG.COUNTRY',HIDE=ON, $ 
-*TYPE=REPORT, COLUMN='CENTURYSALES.STORESEG.REGION',HIDE=ON, $
TYPE=REPORT, COLUMN='CENTURYSALES.STORESEG.STATE',HIDE=ON, $ 
TYPE=REPORT, COLUMN='CENTURYSALES.STORESEG.STORENAME',HIDE=ON, $
TYPE=REPORT, COLUMN='CENTURYSALES.PRODSEG.PRODUCTTYPE',HIDE=ON, $ 
.
.     (remainder of code is same as pie chart code)
.


x
Reference: Bar Chart Procedure
-* File CentSalesChartTwo.fex
TABLE FILE CENTURYSALES 
SUM
     'CENTURYSALES.ORDERS.LINEPRICE' AS 'Revenue'
     'CENTURYSALES.PRODSEG.PROFIT'
     'CENTURYSALES.PRODSEG.COSTOFGOODSSOLD'
     'CENTURYSALES.ORDERS.QUANTITY' 
BY 'CENTURYSALES.STORESEG.COUNTRY' 
BY 'CENTURYSALES.STORESEG.REGION' 
BY 'CENTURYSALES.STORESEG.STATE' 
BY 'CENTURYSALES.STORESEG.STORENAME' 
BY 'CENTURYSALES.PRODSEG.PRODUCTTYPE' 
HEADING 
"" 
FOOTING 
"" 
WHERE COUNTRY EQ 'United States' OR 'France'; 
WHERE RECORDLIMIT EQ 500; 
ON TABLE SET PAGE-NUM OFF 
ON TABLE NOTOTAL 
ON TABLE PCHOLD FORMAT AHTML 
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT, 
$ 
TYPE=REPORT,
     GRID=OFF,
     FONT='ARIAL',
     SIZE=9,
     LINES-PER-PAGE=20,
     REPORT-VIEW=CHART,
     CHART-TYPE=BAR,
$ 
-*TYPE=REPORT, COLUMN='CENTURYSALES.ORDERS.LINEPRICE',HIDE=ON, $ 
TYPE=REPORT, COLUMN='CENTURYSALES.PRODSEG.PROFIT',HIDE=ON, $ 
TYPE=REPORT, COLUMN='CENTURYSALES.PRODSEG.COSTOFGOODSSOLD',HIDE=ON, $ 
TYPE=REPORT, COLUMN='CENTURYSALES.ORDERS.QUANTITY',HIDE=ON, $ 
-*TYPE=REPORT, COLUMN='CENTURYSALES.STORESEG.COUNTRY',HIDE=ON, $ 
TYPE=REPORT, COLUMN='CENTURYSALES.STORESEG.REGION',HIDE=ON, $ 
TYPE=REPORT, COLUMN='CENTURYSALES.STORESEG.STATE',HIDE=ON, $ 
-*TYPE=REPORT, COLUMN='CENTURYSALES.STORESEG.STORENAME',HIDE=ON, $ 
TYPE=REPORT, COLUMN='CENTURYSALES.PRODSEG.PRODUCTTYPE',HIDE=ON, $ 
.
.     (remainder of code is same as pie chart code)
.


x
Reference: Tabular Report Procedure
-* File CentSalesGridOne.fex
TABLE FILE CENTURYSALES 
SUM
     'CENTURYSALES.ORDERS.LINEPRICE' AS 'Revenue'
     'CENTURYSALES.PRODSEG.PROFIT'
     'CENTURYSALES.PRODSEG.COSTOFGOODSSOLD'
     'CENTURYSALES.ORDERS.QUANTITY' 
BY 'CENTURYSALES.STORESEG.COUNTRY' 
BY 'CENTURYSALES.STORESEG.REGION' 
BY 'CENTURYSALES.STORESEG.STATE' 
BY 'CENTURYSALES.STORESEG.STORENAME' 
BY 'CENTURYSALES.PRODSEG.PRODUCTTYPE' 
HEADING 
"" 
FOOTING 
"" 
WHERE COUNTRY EQ 'United States' OR 'France'; 
WHERE RECORDLIMIT EQ 500; 
ON TABLE SET PAGE-NUM OFF 
ON TABLE NOTOTAL 
ON TABLE SET BYDISPLAY ON
ON TABLE PCHOLD FORMAT AHTML 
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT, 
$ 
TYPE=REPORT,
     GRID=OFF,
     FONT='ARIAL',
     SIZE=9,
     LINES-PER-PAGE=20,
$ 
-*TYPE=REPORT, COLUMN='CENTURYSALES.ORDERS.LINEPRICE',HIDE=ON, $ 
-*TYPE=REPORT, COLUMN='CENTURYSALES.PRODSEG.PROFIT',HIDE=ON, $
-*TYPE=REPORT, COLUMN='CENTURYSALES.PRODSEG.COSTOFGOODSSOLD',HIDE=ON, $
-*TYPE=REPORT, COLUMN='CENTURYSALES.ORDERS.QUANTITY',HIDE=ON, $ 
TYPE=REPORT, COLUMN='CENTURYSALES.STORESEG.COUNTRY',HIDE=ON, $ 
-*TYPE=REPORT, COLUMN='CENTURYSALES.STORESEG.REGION',HIDE=ON, $ 
-*TYPE=REPORT, COLUMN='CENTURYSALES.STORESEG.STATE',HIDE=ON, $ 
-*TYPE=REPORT, COLUMN='CENTURYSALES.STORESEG.STORENAME',HIDE=ON, $ 
-*TYPE=REPORT, COLUMN='CENTURYSALES.PRODSEG.PRODUCTTYPE',HIDE=ON, $ 
.
.     (remainder of code is same as pie chart code)
.

WebFOCUS