I am creating this:
- Code: Select all Expand view RUN
********************************************************************************************
Static function detal_Res(cDbf_p,cPro,wTit)
********************************************************************************************
Select(cDbf_p)
DbGoTop()
If wTit = "PD"
cTit := "RESUMO DOS PEDIDOS PENDENTES DO PRODUTO: "+Alltrim(cPro)
Elseif wTit = "CP"
cTit := "RESUMO DOS PEDIDOS DE COMPRA PENDENTES DO PRODUTO: "+Alltrim(cPro)
Else
cTit := "RESUMO DAS ORDENS DE MANUFATURA PENDENTES DO PRODUTO: "+Alltrim(cPro)
Endif
DEFINE DIALOG oDlg SIZE 800,420 FONT WndMain():oFont TITLE cTit TRANSPARENT
@ 10,10 XBROWSE oBrw OF oDlg SIZE 380,180 PIXEL;
ALIAS (cDbf_p);
AUTOSORT AUTOCOLS FOOTERS LINES CELL
oBrw:DT_EMISS:cEditPicture := 'dd/mm/yyyy'
oBrw:DT_PREV:cEditPicture := 'dd/mm/yyyy'
oBrw:DelCol( 1 ) // Deleta Coluna
AEval( oBrw:aCols, { |o| o:cToolTip := { 'Column :' + CRLF + o:cHeader, 'ToolTip' } } ) // ToolTip nas colunas
oBrw:bClrStd := {|| {CLR_BLACK, iif(oBrw:Keyno()%2=0, CLR_WHITE, CLR_HGRAY) } } // Cores nas linhas (Par/Impar) ou (oBrw:cAlias)->(RecN())%2=0
oBrw:CreateFromCode()
@ 195, 010 BUTTON "&Imprimir" SIZE 50,10 FONT oFontGet PIXEL ACTION IIF( MsgYesNo("Deseja imprimir essa planilha?","Confirme"), Listar(cTit,,,,,,,,,,,,,.F.), )
@ 195, 070 BUTTON "&Excel" SIZE 50,10 FONT oFontGet PIXEL ACTION oBrw:ToExcel()
@ 195, 130 BUTTON "&Fechar" SIZE 50,10 FONT oFontGet PIXEL ACTION oDlg:End()
ACTIVATE DIALOG oDlg CENTERED;
ON INIT oBrw:SetFocus()
Return(.T.)