Display negative no's as DR in xBrowse [Solved]

Display negative no's as DR in xBrowse [Solved]

Postby anserkk » Wed Sep 17, 2008 6: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
Last edited by anserkk on Wed Sep 17, 2008 11:00 am, edited 1 time in total.
User avatar
anserkk
 
Posts: 1332
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Postby StefanHaupt » Wed Sep 17, 2008 6:46 am

Anser,

did you try the picture clause ?

Code: Select all  Expand view
PICTURE for  SAY

X  shows DB (Debit) after negative numbers
C  shows CR (Credit) after positive numbers
     
kind regards
Stefan
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Postby anserkk » Wed Sep 17, 2008 7: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

Code: Select all  Expand view
@ 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'
User avatar
anserkk
 
Posts: 1332
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Postby mmercado » Wed Sep 17, 2008 9: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
User avatar
mmercado
 
Posts: 782
Joined: Wed Dec 19, 2007 7:50 am
Location: Salamanca, Gto., México

Postby anserkk » 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
User avatar
anserkk
 
Posts: 1332
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 75 guests