Formatting a Cell

 < Day Day Up > 



An individual cell is the lowest level of detail in a BusinessObjects report. It may contain a variable that displays information from a data source, a formula that calculates additional information, or a constant that shows a report title. Most often, you will want to format a cell when it contains a constant. Otherwise, it is more efficient to format a block or a section.

Via the Toolbar

To select an individual cell, you can click the cell in the report window or select the cell within the Report Manager, Map, Structure view. In the following example, a cell in the Main Section Header is selected. This cell acts as the report title for all tables, crosstabs, and charts within the current report tab.

The toolbar buttons will change to reflect the cell’s current format. If the font is bolded, then the bold button on the toolbar is highlighted. In the following example, the current font is Arial, Regular, 12 point. The text is centered. The cell has a border. You will change it to Times New Roman, bold, italic, 18 point, left aligned, with no cell border.

  1. Select the cell either in the Report Manager or the Report window.

    click to expand

  2. From the Formatting toolbar, use the Font drop-down box to change the font from Arial to Times New Roman.

  3. Use the Font Size drop-down box to change the font from 12 point to 18 point.

  4. Click the desired formats, shown at left, on the toolbar. In this example, Bold, Italic, Left Aligned, No Border. The final cell format should appear as shown next. Notice that the left alignment applies only to the particular cell’s contents and not to the cell’s position in the report. To position a cell within a report, use Format | Cell, then select the Appearance tab.

    click to expand

The Cell Format Pull-Down Menu

The pull-down menu Format | Cell allows you to change formats similar to those in the toolbar but provides more options. Ideally, the BusinessObjects universe designer will have specified default object formats in the universe that make sense for most of the data values. If you find yourself often reformatting certain columns of data, ask the designer to apply a format to the object definition in the universe. Several of the tabs that allow you to format an individual cell serve the same purpose when formatting a table or a chart; common tabs are described only under the present section, “Formatting a Cell”; they are not repeated under “Formatting a Table” and “Formatting a Chart.”

The Number Tab

Within the Number tab, there are multiple categories such as Standard, Custom, Date, Number, and Boolean, as shown in Figure 17-1. Don’t let the name of the dialog box tab, “Number,” mislead you; the different categories allow you to format individual cells that are character, number, or date. Under each category, you can further customize a cell’s format. The available formats are different for each category. For example, Date/Time allows you to display a date object as dd/Mmm/yy (01/Jan/03) or as Mmm-dd-YYYY (Jan-01-2003), whereas Percentage allows you to choose to include the % symbol and a specified number of decimal places.

click to expand
Figure 17-1: Format Cell, Number tab

Unless the universe designer or report author applies a particular number format, BusinessObjects interprets everything as Standard. With Standard, numeric values will have two decimal places and no thousands separator. This can look messy for numeric fields such as Years or Product IDs that are not measures, in which case the object should be formatted as a Number with no decimal places.

Tip 

Format numeric fields that are not measures as Number, 0 format. Request the universe designer to do this at the object level. For example, a Year object may indeed be a number, but 2003.00 is not a correct representation of the year, whereas 2003 is. However, the cell format must match the object type. If you format a numeric column as Date with YYYY as the format, BusinessObjects displays all 0’s. To correctly format numeric columns without the decimal places, use the Category Number, with the Format 0 (no decimal places, no thousands separator). You can also create a new Number format to precede the year display with FY to indicate Fiscal Year.

The Custom category contains formats that you have added. The Number category contains settings for numeric fields that specify the number of decimal places, thousands separators, zero treatment, and negative values. For example, you can have positive numbers formatted in black with negative numbers formatted in red. To specify a color format, insert the color in brackets—for example, [Red] to display a negative number in red. In the Currency category, BusinessObjects provides U.S. dollars ($) and Euros as standard symbols. To create a format for British Pounds, as shown in Figure 17-1, enter the following in each box:

Positive

£#,##0

Negative

£(#,##0)[Red]

Note that you can use either the # symbol or a 0 as a placeholder for each digit. In the preceding example, there is a comma for a thousands separator and no decimal places. Negative values display in red and with parenthesis around them. Click Add to add the format to the Currency category, then OK to close the Cell Format dialog box. This format will also now appear under the Custom category.

Under the Boolean category, you can alter the format for cells that display 0’s and 1’s; unfortunately, the Boolean format does not work for cells that contain other Boolean types such as yes/no, true/false. The format provided will convert a cell containing 1 to True and 0 to False. The information in the data source may use a Boolean field to flag products as stock items or order items; valid or discontinued. While you could use an if-then-else formula to convert the 0’s and 1’s to more meaningful descriptions, it is easier to add a format to display Yes/No, Stock/Order, Valid/Discontinued, and so on. The Condition category works in a similar way to the Boolean category in that it allows you to display text in place of numbers depending on whether the number is positive, negative, zero, or undefined.

Alignment

Within the Alignment tab, you have additional options over the toolbar, as shown in Figure 17-2. Here you see that the default alignment is General. With a General alignment, BusinessObjects looks at the object type to determine how to align the values. If they are text values such as dimensions and details, they are aligned left; numeric values align right unless you specify a different alignment.

click to expand
Figure 17-2: Format Cell, Alignment tab

Under the Settings section of the Alignment tab, you can specify how to treat text:

  • Fill When you select Fill, the Character box becomes enabled. You can append a column with a character such as a period or dashes to fill the cell as in the following example:

    click to expand

  • Wrap Text For columns with long text names, you can choose to wrap the text rather than truncate the display. When you choose Wrap text, the row height does not automatically adjust to accommodate the number of rows. In order to adjust the row height, also select the option Row by row auto fit.

  • Row by row auto fit Check this when you use Wrap Text so that the row height automatically adjusts to display all available text, as shown next. The cells in the table on the left are truncated and do not have the format Wrap Text. The cells on the right used the settings Wrap Text and Row by row auto fit.

    click to expand

  • Repeat On Every Page This option is enabled for individual cells only and not cells within a table block. Use this to have a cell within the main section, such as a title or picture, appear on every page.

Font

When you want to change the font and font size for certain cells, you can use the formatting toolbar as described earlier. Within the Font tab, you can make similar changes, but in addition, there are options to select a strikethrough format to put hatch marks over a particular cell.

Border

The border buttons on the border toolbar allow you to select where to place a border within a given cell. By default, BusinessObjects uses a single-line box border around free-standing cells that you use as either titles or master cells in a master/detail report. The Border tab allows you also to specify a line format and a border color within a range of cells as shown in Figure 17-3. The Border box shows the borders for the current cell range.

click to expand
Figure 17-3: Cell Format, Border tab

  1. To use a particular line format, select the line format under Style. In Figure 17-3, the double line is selected.

  2. Within the Border box, click the cell position within the grid. This is the bottom line in Figure 17-3, as indicated by the two triangles.

  3. Click Apply.

Shading

The Shading tab allows you to specify if the background of a cell contains any shading. By default, BusinessObjects uses the following shading for the different types of cells:

  • Free-standing None

  • Block Header Solid dark blue

  • Block Body 25 percent yellow

If you want to permanently modify the default shading for these cells, refer to the section “Standard Report Styles” at the end of this chapter.

Appearance

The Appearance tab appears only for free-standing cells, sections, or entire blocks; it will not appear if you have selected a range of cells within a table. Name allows you to specify a name for an individual cell that will then appear in the Report Manager, Map, Structure view. In Figure 17-4, the cell is renamed Title Cell.

click to expand
Figure 17-4: Cell Format, Appearance tab

When you insert an initial cell, BusinessObjects inserts the cell relative to the section delimiters. To have the position relative to another component, click the drop-down box next to Horizontal Position Relative to: From here, you can have the title cell placed next to the left margin or centered across the page. As your margins change, the cell position will automatically move with the margin. You can also vertically position cells, tables, and charts. This is particularly important when you have multiple blocks within a document. If the size of your table increases as new rows appear in a table, you must position objects beneath the table relative to one another; otherwise, the block on top will overwrite the block beneath.



 < Day Day Up > 



Business Objects(c) The Complete Reference
Cisco Field Manual: Catalyst Switch Configuration
ISBN: 72262656
EAN: 2147483647
Year: 2005
Pages: 206

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net