FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Zero into Xbrowse
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
Zero into Xbrowse
Posted: Tue Mar 24, 2015 12:18 PM

is there a function or command to not show NIL if the numerici filed have 0.00
I' thinking
IIF( ntotal >0,ntotal,NIL) but I have a big string to calc ntotal allready on xbrowse

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: Zero into Xbrowse
Posted: Tue Mar 24, 2015 12:50 PM
Silvo

You might try this code. This example uses Sql ADO but you can adapt the logic to use .dbf
Code (fw): Select all Collapse
Local oCol


// create xBrowse
...
...

oCol := oLbx:aCols[ 2 ]   // your numeric column defined in xBrowse
   oCol:bStrData := { |x| x := if(oRs:eof(), ,oRs:Fields("Numerici"):Value),;
                                     If( Empty(x), "   ",x ) }


Rick Lipkin
Posts: 1789
Joined: Tue Oct 11, 2005 05:01 PM
Re: Zero into Xbrowse
Posted: Tue Mar 24, 2015 02:22 PM
use picture:

Code (fw): Select all Collapse
... picture "@Z"



B Formats numbers left-justified
C Adds CR (credit) after positive numbers
D Formats dates in SET DATE format
E Formats dates and numbers in British format
L Pads numbers with zeros instead of blank spaces
R Nontemplate characters are inserted
X Adds DB (debit) after negative numbers
Z Formats zeros as blanks
( Encloses negative numbers in parentheses
! Converts alphabetic characters to uppercase
Salu2

Carlos Vargas

Desde Managua, Nicaragua (CA)
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Zero into Xbrowse
Posted: Tue Mar 24, 2015 04:08 PM

Everything is simple with XBrowse.

oCol:lDisplayZeros := .f. // default .t.
or
oBrw:lDisplayZeros := .f. // default .t.

When :lDisplayZeros is False, all empty values like zeros, empty dates are shown as totally blank.

Regards



G. N. Rao.

Hyderabad, India
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
Re: Zero into Xbrowse
Posted: Wed Mar 25, 2015 10:28 AM

this is a fantastic solution

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com

Continue the discussion