Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

String accumulation Error

Status
Not open for further replies.

lauriesamh

Technical User
Sep 1, 2004
119
US
I'm using CR10 and trying to accumulate strings of transaction IDs and am hitting the 65334 limit. I've tried to get around this and am hoping someone can assist in figuring how to accumulate strings into separate "buckets" if a bucket of strings exceeds the length limit.

(@accum)
whileprintingrecords;
shared stringvar x;
shared stringvar x2;

if (recordnumber > (({?Show X Percent of TXN}/100)*distinctcount({table.Txn_ID})) and
len (x + {table.Txn_ID} + "^")<65534) then
x := x + {table.Txn_ID} + "^" ;

if (recordnumber > (({?Show X Percent of TXN}/100)*distinctcount({table.Txn_ID})) and
len(x + {table.Txn_ID} + "^")>=65533) then
if (recordnumber > ({?Show X Percent of TXN}/100)*distinctcount({table.Txn_ID}) and
len(x2)=0) then
if (recordnumber > ({?Show X Percent of TXN}/100)*distinctcount({table.Txn_ID}) and
len (x2 + {table.Txn_ID} + "^")<65534) then
x2:=x2+{table.Txn_ID} + "^";
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top