dbeval error

dbeval error

Postby Silvio.Falconi » Tue Jan 29, 2013 9:12 am

to calculate how naly record I have into a archive I usa dbeval function

But when the dbeval function found a record empty ( with a field empty ) the application crash

sample :

MV->( DBEVAL( { || aCanE[ Month( FIELD->FECHA ) ][ 2 ]+= IIF( FIELD->TIPO="E", MV->TOTAL,0) } ) )

how I can resolve it ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: dbeval error

Postby Patrizio » Tue Jan 29, 2013 10:56 am

Silvio, from xHarbour guide:

Code: Select all  Expand view
DbEval( <bBlock>,[<bForCondition>],[<bWhileCondition>],[<nNextRecords>],[<nRecord>], [<lRest>]) --> NIL


so you can try this:

Code: Select all  Expand view
MV->( DBEVAL( { || aCanE[ Month( FIELD->FECHA ) ][ 2 ]+= IIF( FIELD->TIPO="E", MV->TOTAL,0) }, {||Month(FIELD->FECHA)>0} ) )


or you can try this:

Code: Select all  Expand view
MV->( DBEVAL( { || IF(Month( FIELD->FECHA ) >0, aCanE[ Month( FIELD->FECHA ) ][ 2 ]+= IIF( FIELD->TIPO="E", MV->TOTAL,0), ) }) )
Patrizio
 
Posts: 90
Joined: Wed Nov 07, 2007 8:56 am
Location: Italy

Re: dbeval error

Postby Silvio.Falconi » Tue Jan 29, 2013 8:35 pm

thanks run ok
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 106 guests