Decimal values not displaying correctly...

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
RussCraig
Profound User
Posts: 62
Joined: Wed May 05, 2010 10:13 am
First Name: Russell
Last Name: Craig
Company Name: Applied Business Services
Phone: 252-482-7666
Address 1: 617 Soundside Rd
City: Edenton
State / Province: North Carolina
Zip / Postal Code: 27932
Country: United States
Location: Edenton, NC
Contact:

Decimal values not displaying correctly...

Post by RussCraig »

I have a field declared in Visual Designer as "Decimal, length 9, decimals 2". This field operates correctly when I pass in any value over 1.00. The error occurs when the value drops below 1.00. Here's a brief example:

Code: Select all

Input:        Displays:
532.37        532.37
1.50          1.50
0.80          80.          *here's the error
This happens even when I hard-code a value for the field. For example, I have the field named "oBal", and the error occurs even if I do the following line of code in the RPG program:

Code: Select all

oBal = 0.80
Any idea as to what might be causing this?

Thanks,
-RC
There are 10 types of people in this world: Those who understand binary and those who don't.
User avatar
Rob
Profound Logic Staff Member
Posts: 135
Joined: Fri Jan 04, 2008 12:12 pm
First Name: Rob
Last Name: Ferguson
Company Name: Profound Logic Software
Contact:

Re: Decimal values not displaying correctly...

Post by Rob »

Thank you for this feedback. The latest version of Profound UI (version 2.0.3) has corrected this problem. You can download this from our website and re-install.
RussCraig
Profound User
Posts: 62
Joined: Wed May 05, 2010 10:13 am
First Name: Russell
Last Name: Craig
Company Name: Applied Business Services
Phone: 252-482-7666
Address 1: 617 Soundside Rd
City: Edenton
State / Province: North Carolina
Zip / Postal Code: 27932
Country: United States
Location: Edenton, NC
Contact:

Re: Decimal values not displaying correctly...

Post by RussCraig »

I have narrowed down what seems to be causing the issue. If I have my field declared as "Decimal, length 9, decimals 2", and tell it to "Use 1000 separator", the value doesn't display properly (i.e.: 0.80 shows up as 80.). But if I don't use the 1000 separator, the value displays correctly (i.e.: 0.80 shows up as .80).

So the issue seems to lie in the 1000 separator. This issue is still present in the latest version (2.0.3), even after I recompiled my screen & program.

Thanks,
-RC
There are 10 types of people in this world: Those who understand binary and those who don't.
User avatar
Rob
Profound Logic Staff Member
Posts: 135
Joined: Fri Jan 04, 2008 12:12 pm
First Name: Rob
Last Name: Ferguson
Company Name: Profound Logic Software
Contact:

Re: Decimal values not displaying correctly...

Post by Rob »

Hmmm..

there was a problem in 2.0.2 but we can't re-create this problem in the current version. Can you create a simple test rich display file that demonstrates this?
RussCraig
Profound User
Posts: 62
Joined: Wed May 05, 2010 10:13 am
First Name: Russell
Last Name: Craig
Company Name: Applied Business Services
Phone: 252-482-7666
Address 1: 617 Soundside Rd
City: Edenton
State / Province: North Carolina
Zip / Postal Code: 27932
Country: United States
Location: Edenton, NC
Contact:

Re: Decimal values not displaying correctly...

Post by RussCraig »

I have created a simple Rich Display file that demonstrates this bug, along with the RPG source to drive it. Keep in mind I'm on V5R4, and I'm using ProfoundUI 2.0.3. Also, the values DO display correctly if I use Zero Fill, they only display incorrectly when I use ONLY 1000 separators. Here is the code:

PUITESTFM.dspf (Rich Display File)

Code: Select all

     A                                      INDARA
     A          R TEST
     A                                  1  2HTML('QPUIREC0    ')
     A                                  1  3HTML('{"screen":{"record format nam-
     A                                      e":"TEST"},"items":[{"id":"OutputFi-
     A                                      eld1","field type":"output field","-
     A                                      value":{"fieldName":"oOutput1","dat-
     A                                      aLength":"9","decPos":"2","numSep":-
     A                                      "false","zeroBalance":"false","zero-
     A                                      Fill":"false","curSym":"","dataType-
     A                                      ":"zoned","formatting":"Number","un-
     A                                      its":"","negNum":"-999.00","designV-
     A                                      alue":"[oOutput1]"},"left":"65px","-
     A                                      top":"15px"},{"id":"Label1","field -
     A                                      type":"output field","value":"0.50 -
     A                                      =","left":"10px","top":"15px","font-
     A                                       weight":"bold","text align":"right-
     A                                      ","width":"45px"},{"id":"Label2","f-
     A                                      ield type":"output field","value":"-
     A                                      Decimal, length 9, decimals 2, with-
     A                                      out 1000 separator","left":"145px",-
     A                                      "top":"15px","font weight":"bold","-
     A                                      text align":"left","width":"355px"}-
     A                                      ,{"id":"OutputField2","field type":-
     A                                      "output field","value":{"fieldName"-
     A                                      :"oOutput2","dataLength":"9","decPo-
     A                                      s":"2","numSep":"true","zeroBalance-
     A                                      ":"false","zeroFill":"false","curSy-
     A                                      m":"","dataType":"zoned","formattin-
     A                                      g":"Number","units":"","negNum":"-9-
     A                                      99.00","designValue":"[oOutput2]"},-
     A                                      "left":"65px","top":"40px"},{"id":"-
     A                                      Label2_copy","field type":"output f-
     A                                      ield","value":"Decimal, length 9, d-
     A                                      ecimals 2, with 1000 separator","fo-
     A                                      nt weight":"bold","text align":"lef-
     A                                      t","left":"145px","top":"40px","wid-
     A                                      th":"355px"}]}')
     A            OOUTPUT1       9S 2H
     A            OOUTPUT2       9S 2H 
PUITEST.rpgle (Program to drive screen)

Code: Select all

     H DFTACTGRP(*NO)
     H/DEFINE   PROFOUNDUI
      //
     FPUITESTFM CF   E             Workstn EXTFILE('RECLIB/PUITESTFM')

      /free
        oOutput1 = 0.50;
        oOutput2 = 0.50;
        exfmt TEST;
        *INLR = *On;
      /end-free 

This is the output I get:

Code: Select all

0.50 =  .50  Decimal, length 9, decimals 2, without 1000 separator
        50.  Decimal, length 9, decimals 2, with 1000 separator
There are 10 types of people in this world: Those who understand binary and those who don't.
User avatar
Rob
Profound Logic Staff Member
Posts: 135
Joined: Fri Jan 04, 2008 12:12 pm
First Name: Rob
Last Name: Ferguson
Company Name: Profound Logic Software
Contact:

Re: Decimal values not displaying correctly...

Post by Rob »

I am getting the correct output here:

Code: Select all

0.50 = .50   Decimal, length 9, decimals 2, without 1000 separator
       .50  Decimal, length 9, decimals 2, with 1000 separator 
Can you double check that you have 2.0.3 installed. You can check this on the Visual Designer with Help --> About
RussCraig
Profound User
Posts: 62
Joined: Wed May 05, 2010 10:13 am
First Name: Russell
Last Name: Craig
Company Name: Applied Business Services
Phone: 252-482-7666
Address 1: 617 Soundside Rd
City: Edenton
State / Province: North Carolina
Zip / Postal Code: 27932
Country: United States
Location: Edenton, NC
Contact:

Re: Decimal values not displaying correctly...

Post by RussCraig »

Yes, I am currently using 2.0.3.

Could it be a browser issue? I'm using IE8, v8.0.7600.16385, Windows 7 Pro 32-bit. I have not tried it through Firefox.

Thanks,
-RC
There are 10 types of people in this world: Those who understand binary and those who don't.
User avatar
Rob
Profound Logic Staff Member
Posts: 135
Joined: Fri Jan 04, 2008 12:12 pm
First Name: Rob
Last Name: Ferguson
Company Name: Profound Logic Software
Contact:

Re: Decimal values not displaying correctly...

Post by Rob »

Ah yes it is related to the browser, thank you.

I can now re-create the problem here. We will resolve this ASAP.
User avatar
Rob
Profound Logic Staff Member
Posts: 135
Joined: Fri Jan 04, 2008 12:12 pm
First Name: Rob
Last Name: Ferguson
Company Name: Profound Logic Software
Contact:

Re: Decimal values not displaying correctly...

Post by Rob »

Update:

this has been corrected in our development version and will be included in the next release of Profound UI
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests