Display number with decimal point in DW

Dear all,
I like to display number with three digits after the decimal point in a DW
(column object).
So, in the edit tab, the editmask define as follow:
Masks: Number; Mask: #####.###
The numbers with decimal point it display as I like to, but numbers that
there are integers (i.g-no decimal point) it display like 15.
It displays '.' even for integers.
How can I avoid the decimal point when I display an integer?
TIA & marry Xmas to all,



0
Anotoni
12/26/2001 8:33:38 AM
sybase.powerbuilder.general 62418 articles. 17 followers. Follow

3 Replies
729 Views

Similar Articles

[PageSpeed] 33

Thanks for the quick reply but,
Even if I use the format tab the number is displayed with unnecessary zero's
for example, the integer 169 will display as 169.000 (while the 169.125 will
display as desired)
Does anyone know how to overcome this one?
TIA,


0
Anotoni
12/26/2001 9:40:04 AM
At the column properties at format tab set your format to 0.000. Mask is
just to format the input from the user.

Good Luck.

Arun

"Anotoni" <amitrony@yahoo.com> wrote in message
news:uQ23rlejBHA.303@forums.sybase.com...
> Dear all,
> I like to display number with three digits after the decimal point in a DW
> (column object).
> So, in the edit tab, the editmask define as follow:
> Masks: Number; Mask: #####.###
> The numbers with decimal point it display as I like to, but numbers that
> there are integers (i.g-no decimal point) it display like 15.
> It displays '.' even for integers.
> How can I avoid the decimal point when I display an integer?
> TIA & marry Xmas to all,
>
>
>


0
Arun
12/26/2001 10:21:06 AM
This is a multipart message in MIME format.
--=_alternative 00476FA885256B2E_=
Content-Type: text/plain; charset="us-ascii"

Seems like that would produce alignment problems for the numerical data, 
but ... try setting a conditional expression for the the column's format:

if(  my_column - int(my_column) = 0 ,"#,###", "#,###.000" ) 
--=_alternative 00476FA885256B2E_=
Content-Type: text/html; charset="us-ascii"


<br><font size=1 face="sans-serif">Seems like that would produce alignment problems for the numerical data, but ... try setting a conditional expression for the the column's format:</font>
<br>
<br><font size=1 face="sans-serif">if( &nbsp;my_column - int(my_column) = 0 ,&quot;#,###&quot;, &quot;#,###.000&quot; ) </font>
--=_alternative 00476FA885256B2E_=--
0
mitchell
12/26/2001 1:10:17 PM
Reply:

Similar Artilces:

XSD file Decimal column displays 4 point after decimal
Hi to all,              I have a xsd file with one table adapter, it has 4 column id int name string class string amount decimal i drag and drop the columns into rdlc file but, the report displays 4 digit after decimal point but i want to display it as two decimal point. How to do this experts please help me. But i checked in my query from sql it is displays as it is in the table(there some data have four digit after decimal some data have two digit after decimal) but when get it into DataSet object all data are converted i...

Incorrect numbers returned from DW when getting values from ANY decimal dw column.
We are having a problem when we get a value a user entered into a decimal(19,4) DW column and round it to 2 internally for system calculations. The column is defined as Dec(19, 4) in the DB and therefore it is Decimal(4) in the export syntax. Ex. column=(type=decimal(4) update=yes updatewhereclause=yes name=brokerage dbname="invoice_hdr.brokerage" initial="0" ) Lets say a user enters 100.9450 into this column. Then, later on (not during itemchange) in code we use GetitemNumber to get the value from this column into a variable defined as Ex. Decimal ldc_Test. if...

How to validate a decimal value with 2 digits after decimal point (de decimal point is a comma)
  I am a newbee, I have a Textbox where de user must write the price of an object. How can I validate de data entry in the Textbox (it must be a valid decimal with 2 digits after decimal point), and my pages are in  Portuguese so the decimal point to be accepted must be a comma   thanks  well you can do something like followig:  suppose TextBox1.Text = 123456,789 then you can say if(TextBox1.Text.Contains(",") ) {     int index1 = TextBox1.Text.IndexOf(",") +1;     int index2 = TextBox1.Text.IndexOf(...

DW number display format
Hello, I don't understand how works the DW number display format : - if the format contains caracters not to be interpreted by PB, are those caracters supposed to be displayed as it ? Example : if the format is '##0 M' and the data is 25, can I expect the data to be displayed as '25 M' ? - if the format contains the $ symbol, the documentation says that $ symbol will be replaced at runtime by the actual currency symbol defined in the Windows' international settings. The problem is that it doesn't seem to work like that, and the $ symbol is always dis...

how to remove numbers after decimal point
hi, i need help , i had to do a program , but i'm stuck in this thing, the answer comes out as for example 17.79, i want to just choose 17 and ignore the rest... how can i do that , i tried many things but still :( please help .. thanx Jsut convert it to an int and it will automatically truncate the decimals.  For instance if the 17.79 is in a variable called result, just do something like this.int i = (int)result;   // in C#In VB it;s a bit more complex because explicit conversion would round, so your 17.79 would be rounded to 18. so you need to something more like this Di...

Adding Numbers with decimal points
I have been trying to add a group of textboxes together and display as a whole number with two decimal space  ...  ie 1458.35. I have been converting the textbox.text string to an integer and adding the results with a Math.Round function but it doesn't work (see below). I used the exact same code on a major project two years ago and it worked fine. I am using the (ByVal d As Decimal, decimal As Integer) As Decimal function  The code is: <  Dim num as Integer num = Textbox1.Text Dim num2 As Integer num2 = Textbox2.Text Dim num3 as Integer num3 = ...

Windows 2000 Powerbuilder Decimal Point
The datawindow is an external datawindow. It is not linked to a database. Grtz Glenn ...

number/decimal type in dw.editmask
Problem: Illegal Number Format error when updating the datawindow Setup: Powerbuilder 6.5 Oracle DB 7.3.4.4.0 WinNT 4.0 SP5 German German Environment If the application has to use the decimal separator ',' (set per DBParm or NLS_NUMERIC_CHARACTERS) and the column is defined as number in the database, Powerbuilder handles this data internally as number, ok. But if this data is modified inside datawindows by using an editmask, the DB-error "invalid number" rises up when updating the DB. This happens because Powerbuilder has to treat this data as decimal, but ...

Display to X decimal points, no trim?
Hi there, any help would be greatly appreciated.I am trying to display a float/double to three decimal points...i.e. 0.901.  However, when it's .900 the display shortens to .9.I wish to have .9 displayed as .900.  How is this done?Thanks in advance for any help. Take a look at this article http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconcustomnumericformatstrings.asp JamesJames Hearst.NET Application Developer Many thanks!...

Formatting number with and without decimal point
This is more of a generic powerbuilder question, but can anyone describe how to format a number so that it will show decimal places when there are some but then show the number as an integer (no decimal point) when there are none. Ex. when rounded to 2 decimal places 2.75 should show as 2.75 2.50 should show as 2.5 2.00 should show as 2 Thanks Jay ...

SaveAs omits the numbers after decimal point
I have encounterd a problem using datawindow.SaveAs() function to save data in dBase3 format. All numeric columns are formatted as numeric(16,0), therefore the numbers after the decimal point are lost. What can I do to get back those numbers? Please help! Thanks in advance! Ben > I have encounterd a problem using datawindow.SaveAs() function to save > data in dBase3 format. All numeric columns are formatted as > numeric(16,0), therefore the numbers after the decimal point are lost. > What can I do to get back those numbers? Please help! Is it too simplistic to sugg...

Formatting number with and without decimal point
Can anyone describe how to format a number so that it will show decimal places when there are some but then show the number as an integer (no decimal point) when there are none. Ex. when rounded to 2 decimal places 2.75 should show as 2.75 2.50 should show as 2.5 2.00 should show as 2 Thanks Jay well ... for number display formats, the # represents a number and 0 represents a required number so ... #.## should be what you're looking for Jim On 6 Feb 2008 09:26:12 -0800, in sybase.public.powerbuilder.general <Jay> wrote: >Can anyone describe how...

Display the number of items of a dw in the status bar
Hi! I would like to create a service that will display the number of items in the datawindow requesting the service. I'm not sure how to implement that kind of service. Should I create a function in the n_cst_winsrv_statusbar, like of_SetRowCount(TRUE) that will create a panel to display the number of rows in the datawindow. Where should I register the datawinow requesting the service and where is the best place to update the display as the number of rows change? Any help will be really appreciated Patrick Lessard Patrick, I would recommend that you make it a...

How to display on two decimal point in grid view
I have a GridView with a decimal value in it This decimal value can be up to 4 digits to the right of decimal point but how do I get it to display only two digits if the far right 2 are 0's  in other words say I have a decimal that is .21 and one that is .212  how I currently have the Gridview setup it will display the values as .2100 and .2120 you my show the decimal string like this rate..ToString("#.##");and that will solve your problem i hope ;) Muhanad YOUNISMCSD.NETMy Blog || My Photos || LinkedIn Hi,  You can use dataformatstring in bounded field...

Web resources about - Display number with decimal point in DW - sybase.powerbuilder.general

Comparison of display technology - Wikipedia, the free encyclopedia
CRTs use an electron beam, scanning the display, flashing a lit image. If interlacing is used, a single full-resolution image results in two ...

Paris attacks: France holds solemn ceremony for victims of terror attacks, displays pictures of 130 killed ...
President Francois Hollande tells a memorial for victims of the Paris Attacks that France will respond to the army of fanatics with songs, concerts ...

Huawei Mate 8 is official, features powerful Kirin 950 processor, full HD display and metal body
After weeks of speculation and rumors, Huawei finally announced the Mate 8 in Shanghai this morning. It's being targeted at the Chinese market, ...

Report: Apple to begin shifting iPhone displays from LCD to OLED in 2018
... benefits from deeper blacks and greater energy efficiency thanks to OLED technology Apple is expected to begin shifting iPhones from LCD displays ...

Lava Iris X10 Listed Online, HD Display & 3GB Of RAM In Tow
Lava is one of the largest India-based smartphone manufacturers. This company tends to release quite a few devices on a yearly basis, and 2015 ...

Apple’s iPhones to feature OLED displays from 2018
It looks like Apple is set to bring an OLED display to its line of iPhones starting in 2018, according to a recent report. The news comes from ...

Universal Display Rises on Chatter 2018 iPhones Will Use OLED Tech
Shares of organic light-emitting diode technology vendor Universal Display ( OLED ) are up $2.21, or over 4%, at $54.16, following some positive ...

HOA Decides Not To Sue Man Over Controversial Christmas Display With Hundreds Of Lights, Live Camel
... Washington man who takes a next-level approach to the holiday: his local homeowner’s association has decided it won’t sue him over his display, ...

iPhone 7s may be the first iPhone to boast an OLED display
Apple has reportedly confirmed to its supply chain that it plans to switch from LCD panels to OLED ones for iPhones released in 2017-2018. This ...

Digitimes Research: Korea makers to mass produce transparent OLED displays in 2016
Korea panel makers have plans to mass produce 55-inch and above size transparent OLED displays from 2016 into 2017, according to Digitimes Research. ...

Resources last updated: 11/30/2015 6:51:09 AM