Edit format; decimal points

In our PB application we do have a lot of datawindows with quantity fields.
Most of the times (99%) the users have to enter whole numbers only but
sometimes they want to enter decimal values. In the database I have a
decimal field 8.2. but I am struggeling to get a right Edit mask.

I like to have the following:

Value of the field            Display
2.00                                2
2.10                                2.10 (or 2.1)
2.25                                2.25
Empty                            Nothing

The problem is that when I use the format ##,###.## the decimal point is
always shown, so the above example gives the following results:
2.
2.1
2.25
..

How can I prevent the decimal point in the first and the lost example?

Using PB 8.03


Regards

Hans



0
Hans
7/19/2004 10:17:49 AM
sybase.powerbuilder.datawindow 28057 articles. 4 followers. Follow

1 Replies
1163 Views

Similar Articles

[PageSpeed] 55

Conditional formatting...

JMR
> In our PB application we do have a lot of datawindows with
> quantity fields. Most of the times (99%) the users have to
> enter whole numbers only but sometimes they want to enter
> decimal values. In the database I have a decimal field
> 8.2. but I am struggeling to get a right Edit mask.
>
> I like to have the following:
>
> Value of the field            Display
> 2.00                                2
> 2.10                                2.10 (or 2.1)
> 2.25                                2.25
> Empty                            Nothing
>
> The problem is that when I use the format ##,###.## the
> decimal point is always shown, so the above example gives
> the following results: 2.
> 2.1
> 2.25
> .
>
> How can I prevent the decimal point in the first and the
> lost example?
>
> Using PB 8.03
>
>
> Regards
>
> Hans
>
>
>
0
JMR
7/20/2004 2:06:14 PM
Reply:

Similar Artilces:

Need to format float with no decimals or decimal point.
Is there a format for float that displays only the integer portion?  Or at the least, integer portion and decimal point but no digits to right? Eval("L_DistCalc", "{0:f}") Thank you, What about this: Eval("L_DistCalc", "{0:f0}")Limno Wow - thanks.  Is there a good reference book that has all the format forms, control structures and properties.  Everything I have has a the essentials but nothing in depth.  I know this kind of thing is simple but is sure is a lot to try and remember. Thank you,  You can sear...

Datawindow Edit format
Have an edit field on a datawindow. Would like to display: $125.00 for positive amounts $125.00 CR for negative amounts I set a format mask of: $#,##0.00;$#,##0.00 CR and get the following: For +125.00 -> $125.00 Works great For -125.00 -> $0,125.00 CR The leading zero is not suppressed. I have also tried $#,##0.00;$#,##0.00\ CR with no luck. This happenes under PB 9.0.3 build 8004 Shane, Off hand those look like they should work.... An easy alternative is to put a small computed column to the right of th...

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(...

Decimal points in datawindows
I am having a problem with decimals in my datawindows. When I try entering a percentage value, it is abandoning all values to the right of the decimal. Incidentally, the field is a decimal with no validation. Edit Mask: Format: Input: Result: None (General) 3.2 3 None (General) 0.032 0 None (General) 3.2% "Does not pass validation" None 0.00% 3.2 300.00% None ...

How to format a string of percentage format to decimal format ?
How to format a string of percentage format to decimal format ? 1    orginalValue  // value will be 1265.48 2    percentString // value after applying percentage format will be 126548 %3    requiredvalue // value should be 1265.48  I converted the string from orginalValue to percentString, now i need to convert back to requiredvalue. Is there any way to do ? regards, Ananth RM - msarm.com  string percentString="126548 %";double value=double.Parse(percentString.Replace("%","").Tri...

Problem with decimal point in datawindow
It is version 8.0.1 Build 8004. thanks Glenn ...

Supress Decimal Point in format
PowerBuilder 8.0.4 Build 10501 How can i get the following 12.43 1 1.5 13 i.e only show decimal places and the dp, if the item is not an integer. if i use the format #,##0.## i get : 12.43 1. 1.5 13. Which is close, but still shows the "." for integers. I did manages to get it working using a formula within a dw format field if(abs(x) <> x,"#,##0.00","#,##0") - but this really slowed down the report + i would also like to use the format in the script string function : string(12.5,'#,##0.##...

BIND Personal Edition and The Decimal Point
BIND Personal Edition ? Great Idea ! I think I'll mosey on over and check it out ! The Road Hog Regarding The Decimal Point Steve wrote : There are only 10 types of people in this world: those who understand binary, and those who don't. Road Hog wrote : Most of the two types out of ten who don't understand binary still don't get the decimal point and are still vascillating over whether they should enter the digital age. First they need to understand the decimal point and then they may behold the point in binary ! (Is this a Eureka moment for you ?:O. ...

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

Problem with decimal point in datawindow #2
I have a problem with decimals in a datawindow. -When i use a decimal with editmask #0.00 or #0,00 the number i receive from the datawindow is not a decimal For ex.: dec (datawindow.Object.decimal[1]) = 165 (and not 16.5) I tried to change the settings in the registry in the beginning of my program, because the standard on my computer the decimal sign is a comma. So I change it in the program to a point and at the end of the program back to a comma . I also tried to use an edit field but then i have the same problem. What can i do about this? Thanks Glenn Whic...

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 ...

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...

how do move the insertion point in the edit control of the datawindow?
I'd like to move the insertion point after the last charater or in the middle of the text when a column of a datawindow is selected. Any suggestions? Look up SelectText. "If length is 0, no text is selected but PowerBuilder moves the insertion point to the location specified in start" Steve Strong wrote in message ... >I'd like to move the insertion point after the last charater or in the >middle of the text when a column of a datawindow is selected. > >Any suggestions? > > ...

Powerbuilder 10.5.2
This is a multi-part message in MIME format. ---=_forums-1-dub4bead6cb Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit I installed powerbuilder 11.0 and now I go into pb10.5.2 and cannot edit any datawindows. I getted booted out of powerbuilder 10.5.2 giving a Visual Studio Just in Time Debugger window. I think when pb crashes now, this is a window it chooses to open up. I have several customers with 10.5.2 and cannot support them. Everything else seems to work with the exception of the datawindow editor. ---=_forums-1-dub4bead6cb ...

Web resources about - Edit format; decimal points - sybase.powerbuilder.datawindow

Resources last updated: 11/30/2015 3:57:13 AM