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 ?
dbeval error
- Silvio.Falconi
- Posts: 4956
- Joined: Thu Oct 18, 2012 7:17 pm
dbeval error
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
Re: dbeval error
Silvio, from xHarbour guide:
so you can try this:
or you can try this:
Code: Select all
DbEval( <bBlock>,[<bForCondition>],[<bWhileCondition>],[<nNextRecords>],[<nRecord>], [<lRest>]) --> NIL
Code: Select all
MV->( DBEVAL( { || aCanE[ Month( FIELD->FECHA ) ][ 2 ]+= IIF( FIELD->TIPO="E", MV->TOTAL,0) }, {||Month(FIELD->FECHA)>0} ) )
Code: Select all
MV->( DBEVAL( { || IF(Month( FIELD->FECHA ) >0, aCanE[ Month( FIELD->FECHA ) ][ 2 ]+= IIF( FIELD->TIPO="E", MV->TOTAL,0), ) }) )
- Silvio.Falconi
- Posts: 4956
- Joined: Thu Oct 18, 2012 7:17 pm
Re: dbeval error
thanks run ok
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC