dbeval error

Post Reply
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

dbeval error

Post by Silvio.Falconi »

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 ?
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
Patrizio
Posts: 90
Joined: Wed Nov 07, 2007 8:56 am
Location: Italy
Contact:

Re: dbeval error

Post by Patrizio »

Silvio, from xHarbour guide:

Code: Select all

DbEval( <bBlock>,[<bForCondition>],[<bWhileCondition>],[<nNextRecords>],[<nRecord>], [<lRest>]) --> NIL
so you can try this:

Code: Select all

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

MV->( DBEVAL( { || IF(Month( FIELD->FECHA ) >0, aCanE[ Month( FIELD->FECHA ) ][ 2 ]+= IIF( FIELD->TIPO="E", MV->TOTAL,0), ) }) )
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: dbeval error

Post by Silvio.Falconi »

thanks run ok
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
Post Reply