Consultor Eletrônico



Kbase 20443: How to Right-Justify Integer or Decimal Fields Based on SDO?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   18/04/2008
Status: Unverified

GOAL:

How to right-justify numeric fields in a SmartViewer (SV) linked to a SmartDataObject (SDO)?

GOAL:

How to Right-Justify Integer or Decimal Fields Based on SDO?

FIX:

It is possible to right-justify the integer or decimal fields by not respecting the database format in the SDO.
Follow the steps in the example below (based on the Sports2000 database):

1) Open the AppBuilder.

2) Create an SDO based on table invoices.

Include all fields; CustNum, InvoiceDate, InvoiceNum, OrderNum, ShipCharge, TotalPaid, Amount, and Adjustment.

3) If you want to display certain fields with a right-alignment, you must change the field format in the SDO by accessing its PROPERTY-SHEET and editing the integer and decimal field format.

a) Access the property sheet of the SDO.

b) Click on the Field button.

c) Change the format in the column editor field by field.

In this example, TotalPaid has default format of the Dictionary ("->>.>>9, 99").

d) Change it to "-ZZ.ZZ9,99".

After you change the format of each field that you want right-justified, you can build the SV based on that SDO.