Espero haberme explicado correctamente y ver si existe alguna solución para este peculiar comportamiento.
Uso FW16.04+Harbour+BCC7+xDevStudio0.72
Aqui parte del cósigo que estoy ejecutando:
Code: Select all
Function revi_inci
public oDlgins
close all
use &dbtmp1 alias nomina
DbGotop()
define font oFont1 name "TIMES NEW ROMAN" size 0,-14 bold
DEFINE DIALOG oDlgins resource "dlgverdb5" of oVentprinc title "Incidencias para nomina semanal" icon "icono1" font oFont1g
cLeye1:=" Incidencias correspondientes al periodo del: "+cIpr+" al: "+cFpr+" de la sucursal "+alltrim(locncode)
redefine say prompt cLeye1 ID 1 of oDlgins font oFont1
oBrw := TXBrowse():New( oDlgins )
oBrw:nMarqueeStyle := MARQSTYLE_HIGHLCELL //seleccion por celda
oBrw:nColDividerStyle := LINESTYLE_INSET
oBrw:nRowDividerStyle := LINESTYLE_INSET
oBrw:lColDividerComplete := .t. //completa pintado hasta el footer cuando lineas no llenan todo el browse
oBrw:nHeaderHeight := 44 //Altura cabeceras de col
oBrw:lRecordSelector := .t. //poner o no, COL de la flechita de la izq
oBrw:nHeaderLines := 3
oBrw:bClrHeader := {|| { nRGB(152, 251, 152), nRGB(47, 79, 79) } }//{|| { nRGB(140, 0, 0), nRGB(229,0,0) } } // VERDECITO
oBrw:bClrFooter := oBrw:bClrHeader
oBrw:bClrStd := {|| { nRGB( 0, 0, 0), nRGB(255,248,220) } } // colores para lineas normales
oBrw:bClrSel := {|| { nRGB( 0, 0,255), nRGB(241,222,088) } } // para barra de linea selecc cuando el control no tiene el foco
oBrw:bClrSelFocus := {|| { nRGB( 0, 0, 0), nRGB(248,195, 34) } } // para barra de linea selecc cuando el control tiene el foco
oBrw:nRowHeight := 19
oBrw:lFastEdit := .T.
oCol = oBrw:AddCol()
oCol:bStrData = { || nomina->sucursal }
oCol:nDataStrAlign := 0
oCol:nHeadStrAlign := AL_LEFT
oCol:cHeader = "Sucursal"
oCol:nWidth = 60
oCol:oHeaderFont := oFont1
oCol:bClrHeader := { || { color_1(),65535 } }
oCol:oHeaderFont := oFont1
*****Defino todas las columnas del xBrowse........
oBrw:SetRDD()
oBrw:Sucursal:lMergeVert := .t.
oBrw:CreatefromResource(3)
lSalpag:=.F.
redefine button oBtn1cs ID 10 of oDlgins prompt "Salvar" action(oDlgins:end())
redefine button oBtn2cs ID 11 of oDlgins prompt "Procesar" action(oDlgins:end())
redefine button oBtn3cs ID 12 of oDlgins prompt "Integrar" action(oDlgins:end)
redefine button oBtn4cs ID 13 of oDlgins prompt "Detalles" action(deta_inci(),oDlgins:refresh())
redefine button oBtn5cs ID 14 of oDlgins prompt "&Salvar resumen" action(oDlgins:end(),salvainsc())
redefine button oBtn6cs ID 15 of oDlgins prompt "&Cancelar" action(oDlgins:end())
activate dialog oDlgins center on init (obtn1cs:hide(),oBtn2cs:hide(),oBtn3cs:hide(),oBtn3cs:hide())
oFont1:end()
return
Code: Select all
Function deta_inci
nColu:=oBrw:nColSel()
cNonodi:=alltrim(str(no_nomina))
if nColu=5 .or. nColu=6 .or. nColu=7 .or. nColu=8
do case
case nColu=5
cCadsql1di:="Select fechaincide,observaciones from &tInci_dia where no_nomina='&cNonodi' and incapacidad="+;
"'1' and fechaincide between '&cIpr' and '&cFpr'"
case nColu=6
cCadsql1di:="Select fechaincide,observaciones from &tInci_dia where no_nomina='&cNonodi' and vacaciones="+;
"'1' and fechaincide between '&cIpr' and '&cFpr'"
case nColu=7
cCadsql1di:="Select fechaincide,observaciones from &tInci_dia where no_nomina='&cNonodi' and permiso="+;
"'1' and fechaincide between '&cIpr' and '&cFpr'"
case nColu=8
cCadsql1di:="Select fechaincide,observaciones from &tInci_dia where no_nomina='&cNonodi' and falta="+;
"'1' and fechaincide between '&cIpr' and '&cFpr'"
endcase
oRs1di := TOleAuto():New( "ADODB.Recordset" )
oRs1di:CursorType := 1 // opendkeyset
oRs1di:CursorLocation := 3 // local cache
oRs1di:LockType := 3 // lockoportunistic
*msgget("A","B",@cCadsql1di)
*Comando SQL para consultar clientes en GP
TRY
cursorwait()
oRS1di:Open( cCadsql1di,'Provider='+xPROVIDER+';Data Source='+xSOURCE+';Initial Catalog='+xCATALOGA+';User Id='+xUSERID+';Password='+xPASSWORD )
CATCH oErr
MsgInfo( "Error al generar el recordset de detalle de incidencia" )
msgget("A","B",@cCadsql1di)
RETURN(.F.)
END TRY
oRs1dinr := oRs1di:RecordCount()
if oRs1dinr>0
aDatos:={}
oRs1di:MoveFirst()
for unregdi:=1 to oRs1dinr
aadd(aDatos,dtoc(oRs1di:Fields(0):Value))
oRs1di:MoveNext()
next
oRs1di:MoveFirst()
aadd(aDatos,oRs1di:Fields(1):Value)
DEFINE DIALOG oDlg FROM 2, 2 TO 250,450 TITLE "Detalle incidencia" PIXEL of oDlgins
@ 0, 2 SAY " Información de la incidencia " OF oDlg
@ 1, 2 XBROWSE oBrw OF oDlg SIZE 200,85 ;
AUTOCOLS ;
HEADERS "Detalle" ;
SIZES 350 ;
ARRAY aDatos ;
FOOTERS LINES CELL
oBrw:CreateFromCode()
@ 105,165 BUTTON "&Salir" OF oDlg ACTION oDlg:End() pixel
ACTIVATE DIALOG oDlg CENTERED
oRs1di:close()
oDlgins:refresh()
Sysrefresh()
endif
endif
return(NIL)