If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Patterns - text and numeric

Started by seven71d, 03 Aug 2007 12:17:03 PM

Previous topic - Next topic

seven71d

Hello,
I can't find any good reference on how to use the "patterns" to format a numbers/text.
I've got a cheque number with a letter appended on the end.
I would like to format it with spaces and suppress leading zeros.  example 123 456789E
I can't find specific documentation on what is valid as text or numeric patterns.
I only find date specific patterns for text and numerics.

Any help? or solutions?
thanks.

Suraj

Try using replace() function to replace 0 with empty string.
--
suraj neupane

DSR

Hi

If your check number is always having only 1 character at the end then

u better to divide into two parts and then concatenate
it by using a space in between those two  substrings.

I hope it will work for u

Thanks

seven71d

thanks - i've used a combination of trims/substrings stmt's to get the result.

But does anybody know what are valid text/numeric patterns you can use in the DATA FORMAT property option.

thanks.

Andrei I


...
Pattern Guidelines
When you define a pattern, the number of symbols you use affects how the data will be shown.
There are different rules for text, numbers, and values that can take the form of text or numbers.
Text
You can specify whether text is produced in full or abbreviated form.
Numbers
The number of symbols you use in a pattern sets the minimum number of digits that are produced
in a report. Numbers that have fewer digits than specified are zero-padded. For example, if you
specify mm for minutes, and the database value is 6, the report will show 06.
Note: The year value is handled differently. If you specify two symbols for year, the last two digits
of the year value is produced. For example, yyyy produces 1997, and yy produces 97.
Text and Numbers
For values that can produce text or numbers, such as months, you can specify whether text or
numbers are produced, and whether words are abbreviated.
Number of symbols Meaning Example
4 or more Full text form EEEE produces Monday
Less than 4 Abbreviated form EEE produces Mon
Number of symbols Meaning Example
3 or more Text MMMM produces January
MMM produces Jan
Using Patterns to Format Data
Less than 3 Numbers MM produces 01
M produces 1

...
0 A digit that is shown even if the value is zero.
# A digit that is suppressed if the value is zero.
. A placeholder for decimal separator.
, A placeholder for thousands grouping separator.
E Separates mantissa and exponent for exponential formats.
; Separates formats for positive numbers and formats for negative numbers.
- The default negative prefix.