FWH 18.01 & xBrowse numeric display

FWH 18.01 & xBrowse numeric display

Postby TimStone » Wed Feb 21, 2018 10:58 pm

I have found an interesting problem with the xBrowse display of numeric data.

Here is the code used for the browse:

Code: Select all  Expand view

    // Create the browse control
    REDEFINE  XBROWSE oLbx09 ;
      DATASOURCE oEditWork:oWorkRevise ;
      ID 605 OF oDre ;
      HEADERS " Date ", " Time ", " Previous ", " Add ", " New Total ", " Shop Rep ", " Contacted ", " " ;
      COLUMNS "revdat", "revtim", "revold", "(revold + revamt )", "revrep", "revcnt", " " ;
      JUSTIFY 2,2 ;
      ON CHANGE  ( nRevTot := oEditWork:oWorkRevise:revold + oEditWork:oWorkRevise:revamt, oDre:update() ) ;
      UPDATE

    // Provide the header gradient
    oLbx09:bClrGrad := aPubGrad
    // Set the styles
    oLbx09:nMarqueeStyle := MARQSTYLE_HIGHLROW
    oLbx09:nColDividerStyle := LINESTYLE_RAISED
    oLbx09:nRowDividerStyle := LINESTYLE_RAISED
    oLbx09:nHeadStrAligns  := AL_CENTER
    oLbx09:nStretchCol := STRETCHCOL_LAST
 


revold is 0.00
revamp is 574.71
the xbrowse shows revold + revamt as 574.7100000000000036

I had this in another xbrowse also where I had to specify a PICTURE clause plus a size for the field. In that case it was displaying a column with numeric data stored in a .dbf with a structure of N. 12,2

This is a new issue not found in any previous version of xBrowse, but clearly in FWH 18.01.
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2897
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: FWH 18.01 & xBrowse numeric display

Postby ORibeiro » Fri Feb 23, 2018 2:57 pm

I have the same problem.

Has anyone found the solution?

Thanks.
Oscar Ribeiro
OASyS Informática
Fwh18.02 + xHarbour 1.2.3 + Bcc72
User avatar
ORibeiro
 
Posts: 187
Joined: Mon Oct 20, 2008 6:33 pm
Location: Itu, Sao Paulo, Brazil

Re: FWH 18.01 & xBrowse numeric display

Postby nageswaragunupudi » Fri Feb 23, 2018 10:13 pm

Please make the following correction in
\fwh\source\function\valtostr.prg ( lines 116 to 128 )

This is the existing code:
Code: Select all  Expand view
  elseif Empty( cPic )
/*
      if ValType( uVal ) == 'N' .and. cInternational == 'E'
         cVal     := Transform( uVal, '@E' )
      else
         cVal     := cValToChar( uVal )
      endif
*/

      if ValType( uVal ) == 'N'
         cVal     := cNumToStr( uVal, cInternational == 'E' )
      else
         cVal     := cValToChar( uVal )
      endif
 


Please change it as:
Code: Select all  Expand view
  elseif Empty( cPic )

      if ValType( uVal ) == 'N' .and. cInternational == 'E'
         cVal     := Transform( uVal, '@E' )
      else
         cVal     := cValToChar( uVal )
      endif

/*
      if ValType( uVal ) == 'N'
         cVal     := cNumToStr( uVal, cInternational == 'E' )
      else
         cVal     := cValToChar( uVal )
      endif
*/

 
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10206
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: FWH 18.01 & xBrowse numeric display

Postby ORibeiro » Fri Feb 23, 2018 11:13 pm

Thanks Rao
Oscar Ribeiro
OASyS Informática
Fwh18.02 + xHarbour 1.2.3 + Bcc72
User avatar
ORibeiro
 
Posts: 187
Joined: Mon Oct 20, 2008 6:33 pm
Location: Itu, Sao Paulo, Brazil


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 11 guests