Hi all
I'm using CR8 against a SQL2K db.
My prob is that a summed variable I have in the group footer is not behaving the same way in the header. I need to be able to suppress the group header and footer based on a number formula using a particular summed variable.
Here are some details: -
NO subreports!
The data is grouped by a fund code and then security id (with additional grouping that was provided in a previous post of mine -> thread767-921002 ).
The variables are: -
//@DealMth1
Whileprintingrecords;
NumberVar DealMth1;
DealMth1:=
if {Trade.Type} = "B" and
month(minimum({?DateRange})) = month({Trade.Date}) then
Month({Trade.Date})
//@DealMthSum1
whileprintingrecords;
NumberVar DealMth1;
NumberVar Sum1;
Sum1:= Sum1 + DealMth1;
//@DealMth2
Whileprintingrecords;
NumberVar DealMth2;
DealMth2:=
if {Trade.Type} = "S" and
month(minimum({?DateRange})) = month({Trade.Date}) then
Month({Trade.Date})
//@DealMthSum2
whileprintingrecords;
NumberVar DealMth;
NumberVar Sum2;
Sum1:= Sum2 + DealMth2;
//@DealMthSum3
whileprintingrecords;
NumberVar Sum3;
Sum3:= NumberVar Sum1 + NumberVar Sum2;
All three sums have been reset in grp2 (Security Id).
Now, when I drop @DealMthSum3 into the grp2 footer it is fine, say summing to 9, but in t'header it is at 0.
How do I get it to read the values the same way?
Cheers
T
I'm using CR8 against a SQL2K db.
My prob is that a summed variable I have in the group footer is not behaving the same way in the header. I need to be able to suppress the group header and footer based on a number formula using a particular summed variable.
Here are some details: -
NO subreports!
The data is grouped by a fund code and then security id (with additional grouping that was provided in a previous post of mine -> thread767-921002 ).
The variables are: -
//@DealMth1
Whileprintingrecords;
NumberVar DealMth1;
DealMth1:=
if {Trade.Type} = "B" and
month(minimum({?DateRange})) = month({Trade.Date}) then
Month({Trade.Date})
//@DealMthSum1
whileprintingrecords;
NumberVar DealMth1;
NumberVar Sum1;
Sum1:= Sum1 + DealMth1;
//@DealMth2
Whileprintingrecords;
NumberVar DealMth2;
DealMth2:=
if {Trade.Type} = "S" and
month(minimum({?DateRange})) = month({Trade.Date}) then
Month({Trade.Date})
//@DealMthSum2
whileprintingrecords;
NumberVar DealMth;
NumberVar Sum2;
Sum1:= Sum2 + DealMth2;
//@DealMthSum3
whileprintingrecords;
NumberVar Sum3;
Sum3:= NumberVar Sum1 + NumberVar Sum2;
All three sums have been reset in grp2 (Security Id).
Now, when I drop @DealMthSum3 into the grp2 footer it is fine, say summing to 9, but in t'header it is at 0.
How do I get it to read the values the same way?
Cheers
T