Previous Topic: Changing Your Column Relative PositionsNext Topic: Step 1 - Modify a column picture


Changing Your Column Pictures

In this example, you use the Report Format - Picture screen to change the format of data in your report columns.

CA OLQ Release nn.n *** Report Format - Picture *** -> Page 1 of 1 137002 The command you have specified is invalid for this screen Disp Select Options or Alter Seq $ , 0 Picture DEPARTMENT X DEPT-ID-0410 1 _ _ _ 9999 EMPLOYEE X EMP-LAST-NAME-0415 2 X(15) EMPOSITION X SALARY-AMOUNT-0420 3 _ _ _ -ZZZZZZ9.99 Compute: 1=HELP 3=QUIT 4=MESSAGE 5=DISPLAY 6=MENU 10=EDIT 11=GROUP BY

What is a picture?

A picture is a code that represents how the data in a column is displayed. You can format your column data by defining a picture for that column.

For example, when numeric data appears on the report, you create different pictures to display it in different ways:

    With a dollar sign:   $500     Or without:   500
    With commas:        65,000     Or without: 65000
    With leading zeros: 001229     Or without:  1229

    You can also combine these formats:

                       $65,000               001,229

How do you specify a picture?

To specify a column picture, use either of the following fields (but not both):

Select Options

These three columns let you do basic formatting of numeric data. In most cases, these columns are all you need to define pictures for your report columns. You can choose one or more of these options:

$  displays a floating dollar sign

, displays a comma between every three digits (left
of the decimal)

0 displays leading zeros

Alter picture

This option lets you format a column by changing its picture. To change a picture, type over the default value that appears in the Alter Picture entry. For example, suppose you have a column whose picture currently looks like this:

    Alter
    Picture

    9999.99

To display a fixed dollar sign in this column, you could change the picture to this:

    Alter
    Picture

    $9999.99

Picture symbols

Symbol

What it Does

X

Stands for a single alphanumeric character

A

Stands for a single alphabetic character

9

Stands for a single numeric character

Z

Stands for a numeric character and suppresses leading zeros

$

Stands for a numeric character and displays a floating dollar sign

 

.

Displays the decimal point in that position

+

Stands for a numeric character and displays + for positive values

-

Stands for a numeric character and displays - for negative values

B

Displays a blank character (a space) in that position

*

Requests check protection. Leading zeros are displayed as asterisks.

Examples

If you want your column to look like ...

and the data is stored in the database as ...

then specify this picture ...

123400M

123400M

X(7)

1 23400 M

123400M

XBXXXXXBX

JOHN

JOHNSON

A(4)

TWO WORDS

TWOWORDS

A(3)BA(5)

2350000

2350000

9(7)

2350000.00

2350000

9(7).99

$2,350,000.00

2350000

$$$,$$$,$$9.99

23/50/000

2350000

99/99/999

120

00120

ZZZZZZ

+9876

9876

+++99