Dear Mr Rao,
Do you remember the timetable I made on 2012
where I show the teachers timetable
I saw there is an error
When it create the array the procedure insert a record have the field GG_ORA empty
the procedure must not show ( insert ) that record have gg_Ora empty
I punt a condition
if (!Empty(OR->gg_ora))
for sample the procedure insert on array also the record have the field CLASS = 1DIS but these record have gg_ora empty
WHY ?
I COMPILED THE TEST WITH W2 ES2
Do you remember the timetable I made on 2012
where I show the teachers timetable
I saw there is an error
When it create the array the procedure insert a record have the field GG_ORA empty
the procedure must not show ( insert ) that record have gg_Ora empty
I punt a condition
if (!Empty(OR->gg_ora))
for sample the procedure insert on array also the record have the field CLASS = 1DIS but these record have gg_ora empty
WHY ?
#include "FiveWin.ch"
#include "xBrowse.ch"
REQUEST DBFCDX
REQUEST DBFFPT
EXTERNAL ORDKEYNO,ORDKEYCOUNT,ORDCREATE,ORDKEYGOTO
Function Small()
Local aDataDay[60][61]
Local aTeachers:= {}
Local nOre := 0
Local aOre:= [60][1]
Local nShow := 1
Local cDocCogn,cDocNom,nDocente,nOra
RddSetDefault( "DBFCDX" )
SetHandleCount( 100 )
SELECT 1
USE docenti ALIAS DO via "DBFCDX"
SELECT 2
USE orario ALIAS OR via "DBFCDX"
INDEX ON str(OR->PROF,3) TAG ORARIO1 TO TABELLO
SELECT 1
DO->(DbGoTop())
DO WHILE ! DO->(EoF())
cDocCogn:=ALLTRIM(DO->Cognome)
cDocNom:=ALLTRIM(DO->nome)
nDocente:=DO->(recno())
AAdd( aTeachers, cDocCogn+" "+cDocNom )
SELECT OR
OR->(DbSetOrder(1))
OR->(DbSetFilter( {|| OR->PROF=nDOCENTE }, ))
OR->(DbGoTop())
if (!Empty(OR->gg_ora))
Do while ! OR->(eof())
nOra:=val(OR->gg_ora)-9
aDataDay[ndocente][nOra] := alltrim(OR->CLASSE)
OR->(dbskip())
enddo
ENDIF
select DO
DO->(DbGoto(nDocente))
DO->(dbskip())
enddo
AEval( aTeachers, { |c,i| aDataDay[ i ][ 1 ] := c } )
xbrowser adataday
return nilI COMPILED THE TEST WITH W2 ES2
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 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
I use : FiveWin for Harbour March-April 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