Re: Reports 2.5: No format mask for char fields?

From: Ian C. Sellers <icslu_at_boco.co.gov>
Date: 1998/02/13
Message-ID: <34E49B0E.3D4EF60A_at_boco.co.gov>#1/1


Hello Todd,

I would suggest that you do a TO_NUMBER when you select these fields -- costs a little speed, but then you can apply format masks because you end up with a number datatype for those fields in the report.

Kind of goes back to the question of which datatypes to use in design. Many feel that number datatypes should only be used if the column's data will be manipulated mathematically, but this is one reason for using number datatypes in all cases where only numbers are stored in a column. (other reasons, as I recently found, are comparing values with preceding zeros, table joins without LTRIM or LPADding, and more)

-Ian

Todd Owers wrote:

> The Reports 2.5 Reference Manual states: "Character values have no format
> mask. You cannot enter a format mask for fields with character values."
>
> I find this fact surprising, because it is inconsistent with Forms 4.5,
> which does allow format masks on character fields. In my database, I did
> not store the hyphens in phone number and SSN fields, because the form
> would display them via the format mask. But when I print these fields on a
> report, there are no hyphens. Visually, it does not look good to see a
> phone number with all 7 digits pushed together.
>
> Is there a way around this problem?
>
> Thanks in advance.
>
> Todd Owers
> toddo_at_gcr1.com
Received on Fri Feb 13 1998 - 00:00:00 CET

Original text of this message