well Arrays in CR 7 are very limiting...to the point of being useless in my opinion...since you cannot assign their values from variables then.
If there are not too many CUSID's used in the main report we could assign them to single shared variables and do a similar test as we tried before....just more awkward...
Ok let's try this...similar format as before
@initialization (suppressed in main report report header)
WhilePrintingRecords;
shared stringVar ID1:= "";
shared stringVar ID2:= "";
shared stringVar ID3:= "";
shared stringVar ID4:= "";
shared stringVar ID5:= "";
shared stringVar ID6:= "";
shared stringVar ID7:= "";
shared stringVar ID8:= "";
shared stringVar ID9:= "";
shared stringVar ID10:= "";
//make the number of shared variables 50% larger than
//necessary I show the final value as IDn here
shared stringVar IDn:= "";
numberVar iCount := 0;
the collect custid doesn't change much
@collectCustID (suppressed in custid header)
WhilePrintingRecords;
shared stringVar ID1;
shared stringVar ID2;
shared stringVar ID3;
shared stringVar ID4;
shared stringVar ID5;
shared stringVar ID6;
shared stringVar ID7;
shared stringVar ID8;
shared stringVar ID9;
shared stringVar ID10;
//make the number of shared variables 50% larger than
//necessary I show the final value as IDn here
shared stringVar IDn;
numberVar iCount ;
icount := iCount + 1;
if iCount = 1 then
ID1 := {Table.CustID}
else if iCount = 2 then
ID2 := {Table.CustID}
else if iCount = 3 then
ID3 := {Table.CustID}
else if iCount = 4 then
ID4 := {Table.CustID}
else if iCount = 5 then
ID5 := {Table.CustID}
else if iCount = 6 then
ID6 := {Table.CustID}
else if iCount = 7 then
ID7 := {Table.CustID}
else if iCount = 8 then
ID8 := {Table.CustID}
else if iCount = 9 then
ID9 := {Table.CustID}
else if iCount = 10 then
ID10 := {Table.CustID}
//Keep going til you hit the "nth" value
else if iCount = n then
IDn := {Table.CustID};
now in the subreport you will generate the information on ALL CUSTID's, since you cannot use a shared variable in the record select. but in the conditional suppress of the section displaying the information you will put the following formula
whilePrintingRecords;
WhilePrintingRecords;
shared stringVar ID1;
shared stringVar ID2;
shared stringVar ID3;
shared stringVar ID4;
shared stringVar ID5;
shared stringVar ID6;
shared stringVar ID7;
shared stringVar ID8;
shared stringVar ID9;
shared stringVar ID10;
//make the number of shared variables 50% larger than
//necessary I show the final value as IDn here
shared stringVar IDn;
if ID1 = {Table.CustID} or
ID2 = {Table.CustID} or
ID3 = {Table.CustID} or
ID4 = {Table.CustID} or
ID5 = {Table.CustID} or
ID6 = {Table.CustID} or
ID7 = {Table.CustID} or
ID8 = {Table.CustID} or
ID9 = {Table.CustID} or
ID10 = {Table.CustID} or
//Keep going til you hit the "nth" value
IDn = {Table.CustID} then
true
else
false;
there you go...that should work....rather long and tedious though....arrays and for-next loops are much more convenient to use
Jim Broadbent