Consultor Eletrônico



Kbase 13649: Report Builder, European format workarounds 7.3A -d -E
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   5/10/1998
Report Builder, European format workarounds 7.3A -d -E

I) NUMERIC FORMATS


The Report Builder will provide some support for "European" numeric
punctuation in Version 7.3A. "European" punctuation is normally
invoked in PROGRESS itself using the "-E" PROGRESS command-line
parameter. The Report Builder does not actually take "-E" as a
command-line parameter, but the user can turn on this style of numeric
punctuation using the PROGRESS.INI file. The Report Builder supports
European punctuation mostly for *output* only (PROGRESS itself also
supports it for a lot of user input).

Note: the Report Builder will *ignore* the MS-Windows International
settings (off the Control Panel) with respect to numeric format and
date format. Core PROGRESS also ignores the International settings,
which means that the ADE also ignores these settings.


To establish European numeric punctuation for the Report Builder:

The user inserts an entry in the ReportBuilderDefaults section
of the PROGRESS.INI file:

EuropeanFormat=yes


The meaning of "EuropeanFormat=yes":

a) When Report Builder generates reports, it will print all
numeric field values using the comma (',') as the decimal separator
and using the period ('.') for thousands separator (if the format
calls for thousands separators).
b) The NUMERIC built-in function expects to get a character string
input value in which the comma is used for the decimal separator.

c) When the STRING built-in function converts numeric values into
character strings, it will use European punctuation in the strings.

The "EuropeanFormat=yes" has no other effects. The Report Builder
treats all other numeric values with "American" punctuation
(with the period as decimal separator). In particular:

1) Numeric constants that appear in calculated field expressions or
in filter terms must use American punctuation. This is analogous
to the 4GL restriction that all numeric constants in 4GL programs
must use American punctuation.

2) More generally, whenever the user enters a number into a Report
Builder dialog box, s/he must use American punctuation. This is
not the way other ADE tools work--with "-E", the ADE tools expect
the user to use European punctuation when typing numbers into
fill-in fields.

3) Whenever the Report Builder displays numeric values in a dialog
box, it uses American punctuation. Again, this is *not* how the
way other ADE tools work.

4) All numbers in the Report Specification use American punctuation.

5) The REPORT-FILTER built-in function returns a string in which all
numbers use American punctuation. Even when the REPORT-FILTER value
appears in reports, Report Builder will always display any embedded
numbers using American punctuation. For example, if the user has
inserted a calculated field whose expression is REPORT-FILTER(),
the Report Builder might display that field (in the report) as
"Include all records where credit < 123.45"--using American
punctuation for the number 123.45.

6) Format strings themselves use American punctuation. This is how
the 4GL works (but note that Results adopts European punctuation
for format strings). For example, with "EuropeanFormat=yes", a
format string of ">>,>>9.99" might lead to an output value of
12,345.67. The format string itself always uses American
punctuation, but because of the "EuropeanFormat=yes", the Report
Builder would display the numeric value using European punctuation.


DATE FORMATS

Report Builder doesn't support the "-d" PROGRESS command-line option
in Version 7.3A. However, the user (or site administrator) can set up a
user-defined functions to display a date in a non-American order. For
example, the command-line option "-d dmy" tells PROGRESS to display
dates with the day-of-the-month coming before the month. The following
user-defined functions convert an input date into a character string
in different formats (the first three use the '/' for a separator,
but the user or site administrator can substitute other separator
characters):

1) Example output: 22/08/94

Function input: DATE datein
Function expression:

STRING(DAY(datein),"99") + "/" + STRING(MONTH(datein),"99") + "/"
"/" + STRING(YEAR(datein) MODULO 100,"99")


2) Example output: 94/08/22

Function input: DATE datein
Function expression:

STRING(YEAR(datein) MODULO 100,"99") + "/"
+ STRING(MONTH(datein),"99")
+ "/" + STRING(DAY(datein),"99")


3) Example output: 1994/08/22

Function input: DATE datein
Function expression:

STRING(YEAR(datein),"9999") + "/" + STRING(MONTH(datein),"99") + "/"
+ "/" + STRING(DAY(datein),"99")


4) Example output: 22 August 94

Function input: DATE datein
Function expression:

STRING(DAY(datein),"99") + " " + SPELL-MONTH(datein) + " "
+ STRING(YEAR(datein) MODULO 100,"99")


Progress Software Technical Support Note # 13649