mrmookster
Programmer
CR 8.5, SQL Server 2000, XP
i need to suppress a group if the detail section is also suppressed and i may be going about it all wrong but this is what i'm doing.
my group groups pairs of data, and i need to suppress if certain fields in the data are the same.
GH 2 // reset isSuppress flag on each new group
global booleanvar isSuppress;
isSuppress:=FALSE;
Detail // test duplication criteria
global booleanvar isSuppress;
If {#gcount} = 1
AND (Next ({_SP_CR1032;1.CLNT_MATT_CODE}) = {_SP_CR1032;1.CLNT_MATT_CODE})
AND (Next ({_SP_CR1032;1.Amt}) = (-1 * {_SP_CR1032;1.Amt}))
Then isSuppress := TRUE ;
gcount is a ruuning total counting the records in the group, I only want the condition to be evaluated on the first record in the group (ie no 1 of the pair) so we don't evaluate records in different pairs.
if the duplication is valid I set the global flag to TRUE
... what actually happens is this global var isSuppress is never changed
test output (flags only)
gcount isDuplicate isSuppress
1 True False
2 False False
maybe there's an easier way ??
thanks
i need to suppress a group if the detail section is also suppressed and i may be going about it all wrong but this is what i'm doing.
my group groups pairs of data, and i need to suppress if certain fields in the data are the same.
GH 2 // reset isSuppress flag on each new group
global booleanvar isSuppress;
isSuppress:=FALSE;
Detail // test duplication criteria
global booleanvar isSuppress;
If {#gcount} = 1
AND (Next ({_SP_CR1032;1.CLNT_MATT_CODE}) = {_SP_CR1032;1.CLNT_MATT_CODE})
AND (Next ({_SP_CR1032;1.Amt}) = (-1 * {_SP_CR1032;1.Amt}))
Then isSuppress := TRUE ;
gcount is a ruuning total counting the records in the group, I only want the condition to be evaluated on the first record in the group (ie no 1 of the pair) so we don't evaluate records in different pairs.
if the duplication is valid I set the global flag to TRUE
... what actually happens is this global var isSuppress is never changed
test output (flags only)
gcount isDuplicate isSuppress
1 True False
2 False False
maybe there's an easier way ??
thanks