FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Display negative no's as DR in xBrowse [Solved]
Posts: 1335
Joined: Fri Jun 13, 2008 11:04 AM
Display negative no's as DR in xBrowse [Solved]
Posted: Wed Sep 17, 2008 06:09 AM

Friends,

How do I display a numeric column containing both positve and negative numbers as CR and DR (Credit and Debit)

For Eg

100.00 should be displayed as 100.00 CR
-200.00 should be displayed as 200.00 DR
0.00 (Zeroes as Blank)

Regards

Anser

Posts: 824
Joined: Thu Oct 13, 2005 07:39 AM
Display negative no's as DR in xBrowse [Solved]
Posted: Wed Sep 17, 2008 06:46 AM
Anser,

did you try the picture clause ?

 PICTURE for  SAY

 X  shows DB (Debit) after negative numbers
 C  shows CR (Credit) after positive numbers
kind regards

Stefan
Posts: 1335
Joined: Fri Jun 13, 2008 11:04 AM
Display negative no's as DR in xBrowse [Solved]
Posted: Wed Sep 17, 2008 07:34 AM
Thakyou Stefan,

I tried the picture clause. Picture X did not work for me in xBrowse
I beleive it has to be a code block to evaluate whether the number is Negative or Positive or 0.00 and then apply the right Picture format.

When I tried PCITURE X it is displaying all as XXX.XX instead of the orginal no's.

My code

@ 0, 0 XBROWSE oBrw LINES CELL;
     COLUMNS 'NAME','OPENDATE','OPENINGBAL' ;
     HEADERS 'A/c Name','Op.Date','Op.Bal';
     PICTURES ,,'XXXXXX.XX';
     SIZE 210,oDlg:nHeight-35 PIXEL ;      
     OF oDlg ;
     ALIAS 'AcMaster_ACM'
Posts: 782
Joined: Wed Dec 19, 2007 07:50 AM
Display negative no's as DR in xBrowse [Solved]
Posted: Wed Sep 17, 2008 09:38 AM
anserkk wrote:When I tried PCITURE X it is displaying all as XXX.XX instead of the orginal no's.
Hi Anser:

Try this:

PICTURE "@CXZ ######.##"

Regards.

Manuel Mercado
manuelmercado at prodigy dot net dot mx
Posts: 1335
Joined: Fri Jun 13, 2008 11:04 AM
Display negative no's as DR in xBrowse [Solved]
Posted: Wed Sep 17, 2008 10:59 AM
mmercado wrote:
anserkk wrote:
PICTURE "@CXZ ######.##"

Regards.

Manuel Mercado


Thankyou Mr.Manuel Mercado

PICTURE "@CXZ ######.##" worked

Regards

Anser

Continue the discussion