by ADBLANCO » Mon Nov 09, 2009 2:49 pm
Intenta esto:
[code]
FUNC MAIN()
DEFINE WINDOW oWnd TITLE "Sistema" PIXEL
DEFINE TIMER oTimer OF oWnd INTERVAL aConfig[5] ACTION USBChk()
oTimer:Activate()
ACTIVATE WINDOW oWnd ICONIZED ON INIT START(oWnd)
RETU NIL
FUNC START(oWnd)
LOCAL oDlg,oSAY,oLOGO,oPANEL,oBtn,oBtnLOGO,oCBX,nEle
LOCAL oCOM1,oCOM2,oCOM3,oCOM4,oCOM5,oTIPOSYS
LOCAL cCOM:=''
cIMG:=''
oGET:=ARRAY(43)
oG3:=ARRAY(20)
aCOOP:={'','10','20','25','30','33','40','50','60','70','75','80','90','100'}
DEFINE DIALOG oDlg RESOURCE "MENU" of oWnd
REDEFINE FOLDER oFld ID 1003 OF oDlg PROMPT "Pacientes","Agenda","Administracion","Configuracion" DIALOGS "MENU01","MENU02","MENU03","MENU04";
ON CHANGE oFld:aDialogs[oFld:nOption]:UPDATE()
REDEFINE FOLDER oFld2 ID 1003 OF oFld:aDialogs[1] PROMPT "Datos generales","Antecedentes","Nueva consulta","Historia clínica","Laboratorios","Medicamentos" DIALOGS "MENU0101","MENU0102","MENU0103","MENU0104","MENU0105","MENU0106";
...
...
...
REDEFINE SBUTTON oBtn ID 204 OF oFld:aDialogs[3] RESOURCE "B_PRINT" ACTION (REPTRAN(oDlg)) XP PROMPT "Informes" TEXT 3
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
FUNC REPTRAN(oDlgAnt)
LOCAL oDlg,oBtn,OP
DEFINE DIALOG oDlg RESOURCE "REPORTES" of oDlgAnt
REDEFINE BUTTON oBtn ID 101 OF oDlg ACTION DO_REPTRAN(1)
REDEFINE BUTTON oBtn ID 102 OF oDlg ACTION DO_REPTRAN(2)
REDEFINE BUTTON oBtn ID 103 OF oDlg ACTION DO_REPTRAN(3)
REDEFINE BUTTON oBtn ID 104 OF oDlg ACTION DO_REPTRAN(4)
REDEFINE BUTTON oBtn ID 105 OF oDlg ACTION DO_REPTRAN(5)
REDEFINE BUTTON oBtn ID 106 OF oDlg ACTION oDlg:END()
ACTIVATE DIALOG oDlg CENTER
RETU[]
FUNC DO_REPTRAN(N)
LOCAL oFont1,oFont2,oReport,oDlg
LOCAL R:=RECNO()
DEFINE FONT oFont1 NAME "ARIAL" SIZE 0,-10
DEFINE FONT oFont2 NAME "ARIAL" SIZE 0,-8
SELE CUENTAS
DBGOTOP()
IF N=1
REPORT oReport TITLE 'Reporte de cuentas por cobrar al '+DTOC(DATE()) PREVIEW FONT oFont1,oFont2 HEADER "Pagina No. "+STR(oReport:nPage,3) RIGHT CAPTION "Cuentas por pagar"
COLUMN TITLE "NOMBRE DE LA CUENTA" DATA FIELD->NOMBRE FONT 2
COLUMN TITLE "SALDO" DATA FIELD->SALDO FONT 2
END REPORT
ACTIVATE REPORT oReport FOR 'CXC'$FIELD->CUENTA
ELSE
ENDIF
RETU[]
Saludos
Angel, Valencia, Venezuela
xH .997 - FW 7.9 - BCC55 - WorkShop - MySql