I'm trying to implement the Replicatestring function in my formula, but have not been successful. I'd like to make the data that is returned to look like they are in column format and return to the next line after the third "column". The built in column formatting option available in the detail section will not work for me. Presently, my data is being returned in somewhat of a column format but i need the columns to line up correctly - straight. This is being used in the body of a form letter, and the variable is reset int the group header. After multiple posts the formula bellow is the closest i've been. Any help or any new ideas would be appreciated.
WhileprintingRecords;
StringVar Item := {provider.ppo_description};
StringVar Chain;
NumberVar ChCnt:=ChCnt+1;
if length(Chain) + Length(Item) > 254
then Chain := Chain
else if chcnt/3 = int(chcnt/3) then
Chain := chain+', '+Item+chr(13)
else if chcnt/3 <> int(chcnt/3) then
Chain := chain+' '+Item
This an exampe of what my data looks like:
ID Name Addr1 State ppo_description
-- ---- ----- ----- ----------------
01 Pat Ave A NY Local 2
01 Pat Ave A NY Local 4
01 Pat Ave A NY Local 5
03 Jane Ave B NY Local 1
03 Jane Ave B NY Local 15
02 Carl Ave J PA Local 7
I'd Like it to look like this in the form letter:
Local 2 Local 5 Local 7
Local 4 Local 15 Local 9
Local 1 Local 14 Local 3
WhileprintingRecords;
StringVar Item := {provider.ppo_description};
StringVar Chain;
NumberVar ChCnt:=ChCnt+1;
if length(Chain) + Length(Item) > 254
then Chain := Chain
else if chcnt/3 = int(chcnt/3) then
Chain := chain+', '+Item+chr(13)
else if chcnt/3 <> int(chcnt/3) then
Chain := chain+' '+Item
This an exampe of what my data looks like:
ID Name Addr1 State ppo_description
-- ---- ----- ----- ----------------
01 Pat Ave A NY Local 2
01 Pat Ave A NY Local 4
01 Pat Ave A NY Local 5
03 Jane Ave B NY Local 1
03 Jane Ave B NY Local 15
02 Carl Ave J PA Local 7
I'd Like it to look like this in the form letter:
Local 2 Local 5 Local 7
Local 4 Local 15 Local 9
Local 1 Local 14 Local 3