how to control break by char of a field
Posted 10 August 2006 - 08:41 AM
for example : the values of Commodity like this AAA,AAB,ABC,BAC,BAD . I want all the record have AA as a group for total , AB as a group for total ,BA as a group for total ,finally all have A to total, all have B to tota.
the correct report:
how do I handle this ? thanks
I set $commo1=commodity(1,1) $commo2=commodity(1,2) in read after logic
and in control break logic $commo2 as CB1 $commo1 as CB2 , but it does't work well!!!!!
Posted 10 August 2006 - 09:26 AM
Use the control-break VAR-POS-ST and VAR-POS-END. This allows you to use a substring of the variable to trigger the control break. Remember tha control-breaks are executed from bottom to top, so CB2 will also cause CB1 to be executed. This assumes you have sorted your report correctly.
Thus using your commodity variable (sorted on it):
CB1 commodity VAR-POS-ST = 1, VAR-POS-END = 3
CB2 commodity VAR-POS-ST = 1, VAR-POS-END = 2
CB3 commodity VAR-POS-ST = 1, VAR-POS-END = 1
CB4 &$EOF (optional)
This should give the desired result
Edited by jcduym, 10 August 2006 - 09:27 AM.
Reply to this topic
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users