Group Total on Treport

Group Total on Treport

Postby Pedro Faro » Fri Apr 27, 2007 5:43 pm

Hi

I have a Report with 2 groups and i need to declare 2 bEndGroup

oReport:bEndGroup:={ | oCol | (oCol:oReport:aGroups[1]:aTotal[2]:=((oCol:oReport:aGroups[1]:aTotal[4] * 30) )}

oReport:bEndGroup:={ | oCol | (oCol:oReport:aGroups[2]:aTotal[2]:=((oCol:oReport:aGroups[2]:aTotal[4] * 30))}

How can i include this ?

regards
Pedro Faro[/code]
User avatar
Pedro Faro
 
Posts: 31
Joined: Sun Jan 29, 2006 6:34 pm
Location: Lisboa-Portugal

Postby James Bott » Fri Apr 27, 2007 6:36 pm

Just put all your code into the same bEndGroup codeblock.
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby Pedro Faro » Sun Apr 29, 2007 7:04 pm

Hi James

Tanksfor your reply

Please can you give me an example how to join the 2 Bendgroup ?

best regards

Pedro
User avatar
Pedro Faro
 
Posts: 31
Joined: Sun Jan 29, 2006 6:34 pm
Location: Lisboa-Portugal

Postby James Bott » Sun Apr 29, 2007 7:10 pm

You can put several functions in any codeblock like this:

{| | function1(), function2(), function3() }

So for your code just do this:

oReport:bEndGroup:={ ;
| oCol | ;
(oCol:oReport:aGroups[1]:aTotal[2]:=((oCol:oReport:aGroups[1]:aTotal[4] * 30) ),;
(oCol:oReport:aGroups[2]:aTotal[2]:=((oCol:oReport:aGroups[2]:aTotal[4] * 30));
}

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby James Bott » Sun Apr 29, 2007 7:39 pm

Pedro,

I just noticed that you have a syntax error in your code--too many parenthses. It should be:

oReport:bEndGroup:={ ;
| oCol | ;
(oCol:oReport:aGroups[1]:aTotal[2]:=(oCol:oReport:aGroups[1]:aTotal[4] * 30) ),;
(oCol:oReport:aGroups[2]:aTotal[2]:=(oCol:oReport:aGroups[2]:aTotal[4] * 30) );
}

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Treport

Postby Pedro Faro » Tue May 01, 2007 11:12 am

Hi James

Tanks for all

it works fine now.

regards
Pedro
User avatar
Pedro Faro
 
Posts: 31
Joined: Sun Jan 29, 2006 6:34 pm
Location: Lisboa-Portugal


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 35 guests