Tengo el siguiente código de un xBrowse:
- Code: Select all Expand view RUN
REDEFINE XBROWSE oBrw ID 200 OF oDlg;
DATASOURCE oRsHdr;
COLUMNS "HDR_FOL","HDR_CLI","CLI_NOM","HDR_CTD","","","HDR_SDO","HDR_CAN","HDR_MOT";
COLSIZES 50,55,250,60,90,90,90,35,200;
HEADERS "Folio","Empleado","Nombre del empleado","Cantidad","Contado","Credito","Adeudo","Can","Motivo de la cancelación";
PICTURES "@Z 9999999","@Z 99999",NIL,"@Z 999","@Z 99,999.99","@Z 99,999.99","@Z 99,999.99",NIL,NIL;
JUSTIFY {AL_RIGHT,AL_RIGHT,AL_LEFT,AL_RIGHT,AL_RIGHT,AL_RIGHT,AL_RIGHT,AL_CENTER,AL_LEFT};
FOOTERS AUTOSORT
Las columnas 5 y 6 (Contado y credito respectivamente) las defino posteriormente así:
- Code: Select all Expand view RUN
WITH OBJECT :Contado
:bStrData := { || IF(oRsHdr:RecordCount() > 0 .AND.;
oRsHdr:Fields("HDR_CLI"):Value = NIL,;
TRANSFORM(oRsHdr:Fields("HDR_TOT"):Value,"@Z 999,999.99"),SPACE(01))}
:nHeadStrAlign := AL_RIGHT
:nFooterType := AGGR_SUM
:bSumCondition := { || ! oRsHdr:Fields("HDR_CAN"):Value }
:cFooterPicture := "@Z 99,999,999.99"
:nFootStrAlign := AL_RIGHT
END
WITH OBJECT :Credito
:bStrData := { || IF(oRsHdr:RecordCount() > 0 .AND.;
oRsHdr:Fields("HDR_CLI"):Value > 0,;
TRANSFORM(oRsHdr:Fields("HDR_TOT"):Value,"@Z 999,999.99"),SPACE(01))}
:nHeadStrAlign := AL_RIGHT
:nFooterType := AGGR_SUM
:bSumCondition := { || ! oRsHdr:Fields("HDR_CAN"):Value }
:cFooterPicture := "@Z 99,999,999.99"
:nFootStrAlign := AL_RIGHT
END
Aunque tengo definido obtener la suma en ambas columnas, no se muestra el total.
Alguna pista?
Saludos