Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

Working with display formats – PB Docs 90 – PowerBuilder Library

Working with display formats – PB Docs 90

Working with display formats

You work with display formats in the Database painter and
the DataWindow painter.

What you do in the Database painter

In the Database painter, you can:

  • Create, modify, and delete named display formats
    The named display formats are stored in the extended attribute
    system tables. When you have defined a display format, it can be
    used by any column of the appropriate datatype in the database.
  • Assign display formats to columns and remove them
    from columns
    These formats are used by default when you place the column
    in a DataWindow object in the DataWindow painter.

What you do in the DataWindow painter

In the DataWindow painter, you can:

  • Accept the default display format assigned to a column in
    the Database painter
  • Override the default display format with another
    named format stored in the extended attribute system tables
  • Create an ad hoc, unnamed format to use with one
    specific column

Display formats and the extended attribute system
tables

When you have placed a column in a DataWindow object and have given
it a display format (either the default format from the assignment
made in the Database painter for the column or a format assigned
in the DataWindow painter), there is no longer any link to the named format
in the extended attribute system tables.

If the definition of the display format later changes in the
extended attribute system tables, the format for the column in a DataWindow object does
not change. If you want to use the modified format, you can reapply
it to the column in the DataWindow painter.

Working with display formats in the Database painter

Typically, you define display formats and associate them with
columns in the Database painter, because display formats are properties
of the data itself. Once you have associated a display format with
a column in the Database painter, it is used by default each time
the column is placed in a DataWindow object.

note.gif Edit style takes precedence If a column has an associated edit style, the edit style takes
precedence over a display format unless you use an EditMask edit
style and check the Use Format box on the Format property page.

For more information, see “About edit styles “.

proc.gif To create a new display format:

  1. In the Database painter, select Object>Insert>Display
    Format from the menu bar.

    The Display Format view displays.

  2. Name the display format and specify a datatype.

  3. Define the display format using masks.

    For information, see “Defining display formats”.

You can use this display format with any column of the appropriate
datatype in the database.

proc.gif To modify an existing display format:

  1. In the Database painter, open the Extended
    Attributes view.

  2. In the Extended Attributes view, open the list
    of display formats.

  3. Position the pointer on the display format you
    want to modify, display the pop-up menu, and select Properties.

  4. In the Display Format view, modify the display
    format as desired.

    For information, see “Defining display formats”.

proc.gif To associate a display format with a column in
the Database painter:

  1. In the Database painter Objects view, position
    the pointer on the column, select Properties from the pop-up menu,
    and select the Display tab in the Properties view.

  2. Select a format from the list in the Display Format
    box.

    The column now has the selected format associated with it
    in the extended attribute system tables.

proc.gif To remove a display format from a column in the
Database painter:

  1. In the Database painter Objects view, position
    the pointer on the column, select Properties from the pop-up menu,
    and select the Display tab in the Properties view.

  2. Select (None) from the list in the Display Format
    box.

    The display format is no longer associated with the column.

Working with display formats in the DataWindow painter

Display formats you assign to a column in the Database painter
are used by default when you place the column in a DataWindow object. You
can override the default format in the DataWindow painter by choosing another
format from the extended attribute system tables or defining an
ad hoc format for one specific column.

note.gif About computed fields You can assign display formats to computed fields using the
same techniques as for columns in a table.

proc.gif To specify a display format for a column in the DataWindow painter:

  1. In the DataWindow painter, move the pointer to
    the column, select Properties from the column’s pop-up
    menu, and then select the Format tab.

    Information appropriate to the datatype of the selected column
    displays. The currently used format displays in the Format box.
    All formats for the datatype defined in the extended attribute system
    tables are listed in the pop-up list (displayed by clicking the
    button).

  2. Do one of the following:

    • Delete the display format.
    • Select a format in the extended attribute system
      tables from the pop-up list.
    • Create a format for the column by typing it in the
      Format box. For more information, see “Defining display formats”.

    note.gif Format not saved in the extended attribute system tables If you create a format here, it is used only for the current
    column and is not saved in the extended attribute system tables.

note.gif Shortcuts To assign the Currency or Percent display format to a numeric
column in a report, select the column, then click the Currency or
Percent button in the PainterBar or select Format>Currency
or Format>Percent from the menu bar.

Customizing the toolbar

You can add buttons to the PainterBar that assign a specified
display format to selected columns in reports.

For more information, see “Customizing toolbars”.


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x