Was this helpful?
Default Formats
If you do not specify a format after an expression, Report-Writer uses a default format.
Default Format for Strings
Report-Writer prints any string expression without a specified format in its entirety. That is, the default format for strings is c0.
Default Format for Columns
If you do not specify a column format with the .format statement, Report-Writer uses the default format for the column. The default format is based on the data type of the column. For more information, see Determining Default Column Formats in the chapter "Using Report-Writer."
The following table lists default formats for SQL data types:
SQL Data Type
For Reports Other Than Block Style
For Block Style Reports
c1 - c35
c1 - c35
c1 - c35
c36 - cn
where n is the lesser of the maximum configured row size and 32,000
cj0.35
cj0.35
char(1) - char(35)
c1 - c35
c1 - c35
char(36) - char(n)
where n is the lesser of the maximum configured row size and 32,000
cj0.35
cj0.35
text(1) - text(35)
c1 - c35
c1 - c35
text(36) - text(n)
where n is the lesser of the maximum configured row size and 32,000
cj0.35
cj0.35
varchar(1) - varchar(35)
c1 - c35
c1 - c35
varchar(36) - varchar(n)
where n is the lesser of the maximum configured row size and 32,000
cj0.35
cj0.35
integer1
f6
f10
smallint (integer2)
f6
f10
integer (integer4)
f13
f10
decimal (31.31 - 31.0)
Based on size. For example, decimal (5.1) defaults to f7.1, allowing additional digits for the decimal point and an optional +|- sign.
float(n
n10.3
f10.3
float4
n10.3
f10.3
float8
n10.3
f10.3
date
c25
c25
money
'$---------------.nn'
'$---------------.nn'
Note:  All character data types are fully supported in non‑Ingres databases accessed by way of an Enterprise Access product, in which case the column size limit can be greater than the lesser of the maximum configured row size and 32,000.
Default Format for Special Report Variables
The following non-string report variables have the corresponding default formats:
Report Variable
Default Format
page_number
f6
line_number
f6
position_number
f6
left_margin
f6
right_margin
f6
page_length
f6
page_width
f6
current_date
d' 3-feb-1901'
current_time
d' 3-feb-1901 16:05:06'
w_column
The default format for the column currently being used in a .within block. See the default column formats in the previous table.
Default Format for Aggregates
The default format for all the aggregates except count(u) is the format of the column being aggregated. For count(u), Report-Writer uses the default format Nw, where w is the width of the column being counted.
Default Format for Numbers
Any other numeric expressions such as numeric constants, numeric functions, numeric parameters, and arithmetic operations have a default format based on its data type.
Default Format for Dates
Any other date expressions, such as the date function, date parameters and date arithmetic operations, have a default format of c0, which appears in the report as if specified as "d' 3-feb-1901'" for an absolute date, "d' 3-feb-1901 16:05:06'" for an absolute date and time, or as the needed portion of the template "d' 1 yrs 2 mos 3 days 4 hrs 5 mins 6 secs'" for a time interval.
QUEL User Notes on Default Formats
The default column formats used for reports based on QUEL data are identical to those listed in the Default Formats for Columns table, but with the following data types designated differently in QUEL:
In place of:
Use QUEL data type:
integer1
i1
smallint
i2
integer
i4
float4
f4
float
f8
Last modified date: 01/30/2023