WebFOCUS
Online Help > InfoAssist > Customizing and Styling Report Queries > Styling Report Queries
You can apply custom styling to specific areas of a
report query. When creating a report query in InfoAssist, you can
perform the following styling customization.
Procedure: How to Style Data and Column Titles in a Report
You
can style data, column titles, or both in the report output for
the selected data source field.
-
Select the desired data source field in the Query Design pane.
The Field tab is displayed in the Control Panel.
-
Select one of the following in the Style group.
- Data Style
- To style only the data for the selected data source field.
- Title Style
- To style only the column title for the selected data source field.
- Data + Title
- To style both the data and the column title for the selected data source
field.
-
Select any of the following styling options that are available
in the Style group.
- Font type
- Use the drop-down menu to change the font type.
- Font size
- Use the drop-down menu to change the numeric value for the font size.
- Text justification
- Click the Justify Left, Justify
Center, or Justify Right icon
to justify the text.
- Font styling
- Click the Bold, Italic,
or Underline icon to style the selected font.
- Font color
- Click the Font Color icon to open the Color
dialog box, where you can select the font color.
- Background
color - Click the Background Color icon to
open the Color dialog box, where you can select the background color.
Procedure: How to Add Headings and Footings to a Report
You
can make a report more meaningful by adding headings and footings.
Headings and footings supply context and key information about a
report, such as its purpose and audience. Headings and footings
also provide structure, helping you navigate to the detail sought,
and they enhance visual appeal.
In this procedure, you will
add and style a report heading and page heading. The procedure uses
sample values, but you can supply values that apply to your own,
real reports.
This feature is available in Query Design view,
Interactive Design view, and Compose view.
-
With
your report open, click the Head/Foot icon
in the Report group of the Home tab.
The Heading & Footing dialog box opens.
-
Select
the tab for the heading or footing element that you want to add.
For a report, you can add a report heading, page heading,
page footing, or report footing. By default, the Report Heading
tab is selected. In this procedure, accept the default.
-
Click
inside the design area of the dialog box, and type the text for
the heading.
For example, the text for a sample report heading might be
Dollar Sales by Product and Region.
-
Using
the styling ribbon, apply styling to the report heading text.
For example, click the arrow next to the font type field,
and select HELVETICA. Select 11 for
the font size. Click the Italic icon to remove
the default italic font, and click the Left justification
icon to align the heading text with the left side of the report
when it is run.
The sample report heading with the selected styling
values is shown in the following image.
-
Click Apply to
save the changes you have made so far, without closing the dialog
box.
-
To add
a page heading, select the Page Heading tab.
In this procedure, you are going to add one of the supplied
quick text options.
-
Click
the last icon on the right of the styling ribbon, and select Confidential from
the drop-down list.
-
Change
the font and font size as desired. For example, change the font to HELVETICA and
the size to 10. Click the Left justification
icon to align the page heading with the report heading.
You can add your own text before or after the supplied text,
for example, For Regional Managers Only.
-
Click OK to
save the report heading and page heading and close the Heading &
Footing dialog box.
The report heading and page heading that you added and styled
are shown in Interactive Design View in the following image.
-
To make
changes to either the report or page heading, right-click the heading
and select Edit from the drop-down menu.
Procedure: How to Style Headings and Footings in a Report
You
can style headings and footings in the report output for the selected
heading or footing field.
-
Highlight the desired heading or footing text in the Query Design
pane.
The Home tab is displayed in the Control Panel.
-
Click the Style group.
The Style dialog box opens.
-
Select any of the following styling options that are available
in the Style dialog box.
- Font type
- Use the drop-down menu to change the font type.
- Font size
- Use the drop-down menu to change the numeric value for the font size.
- Text justification
- Click the Justify Left, Justify
Center, or Justify Right icon
to justify the text.
- Font styling
- Click the Bold, Italic,
or Underline icon to style the selected font.
- Font color
- Click the Font Color icon to open the Color
dialog box, where you can select the font color.
- Background
color - Click the Background Color icon to
open the Color dialog box, where you can select the background color.
- Reset styles
- Click the Resetting styles icon to reset all
the options to the default styles from the template.
Procedure: How to Style Rows of Data With Alternating Colors in a Report
You
can style rows of data with alternating colors in the report output
for the selected data source field.
-
Select the Home tab on the Control Panel.
-
Select Banded in the Report group.
The Color dialog box opens, as shown in the following image.
-
Click a color square on the left side of the dialog box, or
click an area of the color palette on the right side of the dialog
box.
You can
also select colors by typing numbers in the Hue, Sat, and Lum fields,
or in the Red, Green, and Blue fields. You can also use the up and
down arrows next to each field to set numeric values.
Make
sure that the selected color appears in the Selected Color field
and that the Transparent check box is not selected.
-
Click OK.
-
Run the report.
The
selected color provides an alternating color scheme for the report.
The report output displays alternating rows of data, using a white
background for one row and a background of the selected color for
the next row. This pattern continues throughout the report, as shown
in the following image of Banded report output.
Procedure: How to Apply Traffic Light Conditional Styling to Data in a Report
You
can apply conditional traffic light styling to data for a selected
numeric measure field. By default, the report displays the values
that satisfy the first condition in green, and the values that satisfy
the second condition in red.
-
Select the numeric measure data source field in the Query Design
pane.
The Field tab is displayed in the Control Panel.
-
Select Traffic Lights from the Specific group.
The Traffic Light Condition dialog box opens, displaying
the green light selection fields. You can select and type green
light criteria in these fields.
-
From the drop-down menu below the selected data source field
name, choose one of the following relational operators:
- Equal to
- Not equal
to
- Greater than
- Less than
- Greater than
or equal to
- Less than
or equal to
-
In the field to the right of the operator drop-down menu, type
the desired value for the selected operator. Data values that meet
the criteria will display in green in the report output.
Alternatively, you can select an option from the Values
drop-down menu, and select the desired data value in the Data Values
dialog box that opens. From the Values drop-down menu, as shown
in the following image, you can select Fetch All Values from Source,
Fetch Values from Disk File, Fetch First Value in Source, Fetch
Last Value in Source, Fetch Minimum, or Fetch Maximum.
-
Click Add New.
The red light selection fields are displayed in the Traffic
Light Condition dialog box, where you can select and type red light
criteria.
-
From the red light drop-down menu, choose the desired relational operator.
-
In the field to the right of the red light drop-down menu,
type the desired value for the selected operator. WebFOCUS will
display data values that meet the criteria in red in the report
output.
Alternatively, you can select an option from the Values
drop-down menu, and select the desired value in the Data Values
dialog box that opens.
-
Perform any of the following actions in the Traffic Light Condition
dialog box.
- To delete
an existing traffic light condition, click the Remove button.
- To apply
styling and to change colors, click the Style button.
In the Style pop-up menu that opens, click the color
icon
to open the Color dialog box, where you can select a color different
from the default green and red colors that appear for the first
two conditions. When selecting colors, you can click a color square
on the left side of the dialog box or click an area of the color palette
on the right side of the dialog box. You can also select colors
by typing numbers in the Hue, Sat, and Lum fields, or in the Red,
Green, and Blue fields. You can also use the up and down arrows
next to each field to set numeric values.
- To add more
traffic light conditions, click Add New and select
a different color for each new condition that you specify.
-
Click OK when you are ready to close
the Traffic Light Condition dialog box.
-
Run the report.
The
following image shows the Traffic Light Condition dialog box. It
contains criteria to display values for Unit Sales that are greater
than 600000 in green, and values for Unit Sales that are less than
600001 in red.
The
following image shows the resulting report output with the traffic
light conditional styling applied. The data in the Unit Sales column
is displayed in either green or red, according to the criteria that
was specified in the Traffic Light Condition dialog box.
Procedure: How to Use Cell Padding in a Report
You
can customize the amount of space inserted between rows and columns
in a report.
-
Select the Layout tab in the Control Panel.
-
Select Custom from the drop-down menu
for the Cell Padding button in the Report group.
The Cell Padding dialog box opens.
-
Type the desired cell padding values in the Top, Bottom, Left,
and Right fields.
-
Click OK.
You can change the default formats that are assigned
to a virtual or column field in InfoAssist. The following image
shows the Field Format Options dialog box.
The following procedures show how to change a field format from
the FIeld Format Options dialog box. For more information on how
to use the Format group options from the Control Panel, see Using the Field Tab.
Procedure: How to Assign an Alphanumeric Format
-
Select the
virtual or column field.
-
Right-click
and select Edit Format from the drop-down
menu.
The Field Format Options dialog box opens.
-
Select the Alphanumeric option
in the Field Type option group.
-
To assign
a different length, specify a number between 1 and 4095 in the Total
Length box. The default value is 20.
-
Click OK to
close the Field Format Options dialog box and return to the Results
Panel. The new format appears in the previously selected column.
Procedure: How to Assign a Numeric Format
-
Select the
virtual or column field.
-
Right-click
and select Edit Format from the drop-down
menu.
The Field Format Options dialog box opens.
-
Select one
of the following options in the Field Type option group:
-
Floating
Point (default length 7.2)
-
Integer (default
length 5)
-
Decimal (default
length 12.2)
-
Packed (default
length 12.2)
If the selected field matches the selected
format type, its current length appears in the Length box. Otherwise,
the default length appears in the Length box. The Decimal box shows
the numbers of decimal places for Floating Point, Decimal, and Packed.
-
To assign
a different length, specify numbers in the Length box for format
types as follows: 1-9 for Floating Point, 1-11 for Integer, 1-20
for Decimal, and 1-33 for Packed.
-
To assign
a different number of decimal places for Floating Point, Decimal,
or Packed, specify the number in the Decimal box.
-
Click OK to
close the Field Format Options dialog box and return to the Results
Panel. The new format appears in the previously selected column.
Procedure: How to Assign a Date Format
-
Select the
virtual or column field.
-
Right-click
and select Edit Format from the drop-down
menu.
The Field Format Options dialog box opens.
-
Select the Date option
in the Field Type option group.
-
To assign
a different date display format, select a date format from the Display
Options box. The default date display format is MDY.
-
Click OK to
close the Field Format Options dialog box and return to the Results
Panel. The new format appears in the previously selected column.
Procedure: How to Assign a Date-Time Format
-
Select the
virtual or column field.
-
Right-click
and select Edit Format from the drop-down
menu.
The Field Format Options dialog box opens.
-
Select the Date-Time option
in the Field Type option group.
-
To assign
a different date-time format, first select the date format you wish
to use from either the Year First, Month First, or Day First drop-down menu.
-
Select a time format (if applicable) from the options box on
the right.
Selecting the Time Only check box will let you only set
a time format.
-
Click OK to close the Field Format Options dialog
box and return to the Results Panel. The new format appears in the
previously selected column.
Procedure: How to Add a Percent Sign to a Numeric Field
You
can add a percent sign to the end of a numeric value (Decimal, Integer,
and Floating Point format types). This numeric display option includes
a percent sign along with the numeric data, but does not calculate
the percent.
-
Select the
virtual or column field.
-
Right-click
and select Edit Format from the drop-down
menu.
The Field Format Options dialog box opens.
-
Select one
of the numeric value format types in the Field Type option group
and then select the Percent (%) check box.
-
Click OK to
close the Field Format Options dialog box and return to the Results
Panel. The new format appears in the previously selected column.