Hi Friends
I have coded one report with two groups (using the class report)
Its is possible to create an third group at runtime
and the same time can destroy it before the end of the report?
Thanks in advance!
REPORT oRpt ;
...
GROUP oGrp1 ;
ON Left(TMP->Cuenta,2) ;
HEADER Left(TMP->Cuenta,2)+' '+ACONCUE->Descrip;
FOOTER 'Total :' ;
FONT 5
GROUP oGrp2 ;
ON Left(TMP->Cuenta,4) ;
HEADER Left(TMP->Cuenta,4)+' '+ACONCUE->Descrip;
FOOTER 'SubTotal :' ;
FONT 5
COLUMN TITLE " ","Cuenta" ;
DATA TMP->CUENTA ;
FONT 2 SIZE 9
COLUMN TITLE " ","Ruc" ;
DATA TMP->Ruc ;
FONT 2 SIZE 15 aadd(oRpt:aGroups, oRpt:aGroups[3])
...
...
ACTIVATE REPORT oRpt ;
ON STARTGROUP iif(len(tmp->cuentat)=8,createnewgroup(),);
ON ENDGROUP iif(len(oRpt:aGroups)=3, eval({||oRpt:Delgroup(3), oRpt:Stabilize() }),)
END REPORT
Static Function createnewgroup()
oGrp3:= TRGroup:New({|| tmp->cuenta }, {|| tmp->cuenta+" "+aconcue->descrip}, {|| "Subtotal" }, , , oRpt) // Abort TRGroup does not exist
oRpt:Stabilize()
Return Nil
James
not all the reports can be make with two groups
I should evaluate each register of the table in runtime.
this is my code but i get the message: TRGroup does not exist
[quote]REPORT oRpt ;
...
GROUP oGrp1 ;
ON Left(TMP->Cuenta,2) ;
HEADER Left(TMP->Cuenta,2)+' '+ACONCUE->Descrip;
FOOTER 'Total :' ;
FONT 5
GROUP oGrp2 ;
ON Left(TMP->Cuenta,4) ;
HEADER Left(TMP->Cuenta,4)+' '+ACONCUE->Descrip;
FOOTER 'SubTotal :' ;
FONT 5
COLUMN TITLE " ","Cuenta" ;
DATA TMP->CUENTA ;
FONT 2 SIZE 9
COLUMN TITLE " ","Ruc" ;
DATA TMP->Ruc ;
FONT 2 SIZE 15 aadd(oRpt:aGroups, oRpt:aGroups[3])
...
...
ACTIVATE REPORT oRpt ;
ON STARTGROUP iif(len(tmp->cuentat)=8,createnewgroup(),);
ON ENDGROUP iif(len(oRpt:aGroups)=3, eval({||oRpt:Delgroup(3), oRpt:Stabilize() }),)
END REPORT
Static Function createnewgroup()
oGrp3:= TRGroup:New({|| tmp->cuenta }, {|| tmp->cuenta+" "+aconcue->descrip}, {|| "Subtotal" }, , , oRpt) // Abort TRGroup does not exist
oRpt:Stabilize()
Return Nil
[/quote]
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 100 guests