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!

Multi-Column Formating

Status
Not open for further replies.

psamedy

Technical User
Apr 22, 2002
60
US
I created a form letter in the detail section of a report. Inside the body of the letter I have a concatanated string variable that accumulates data for each letter. The variable is reset in the group header. In the body of the letter I would like to display the variable in columns using the multi-column formating option in the detail section but my efforts are unsuccessful. Please Help
 
Since the variable with the multiple items is not actually multiple rows, you probably cannot use this method. I think that the letter should exist in the group footer.

You might consider including formatting in the variable within the details to handle this, something like:

stringvar MyConcat :=
numbervar TheCounter := TheCounter+1
if TheCounter/3 = int(TheCounter/3) then
MyConcat := {table.field}+replicatestring(" ",25-length({table.field})+chr(13)
else
MyConcat := {table.field}+replicatestring(" ",25-length({table.field})

So this states that the length will be 25 for each column, and to issue a carriage return after each 3rd element to give the look and feel of columnar data.

Remember to reset thecounter variable to 0 in your group header.

This should help you to cheat this, hope this helps.

-k
 
BTW, I was unclear why your letter exists in the details if you're gathering multiple details up in a variable, if I misunderstood the requirements, please post example data.

-k
 
This is what was using:
WhileprintingRecords;
StringVar Item := {PPO_GROUP.DESCRIPTION}
StringVar Chain;
NumberVar ChCnt;

if ChCnt = 1
then (ChCnt:= 2; Chain:= Item)
else
if length(Chain) + Length(Item) > 254
then Chain := Chain else
Chain := chain+', '+Item

When I attempt to use the formatting script posted by Synapsevampire in the previous post I get an error stating that a number is required following the Chr(13). I'm not sure where I went wrong or if this will work for me. Please Help, Thank You

stringvar MyConcat := {PPO_GROUP.DESCRIPTION};
numbervar TheCounter := TheCounter+1;
if TheCounter/3 = int(TheCounter/3) then

MyConcat := {PPO_GROUP.DESCRIPTION}+replicatestring(" ",25-length({PPO_GROUP.DESCRIPTION})+chr(13))
else
MyConcat := {PPO_GROUP.DESCRIPTION}+replicatestring(" ",25-length({PPO_GROUP.DESCRIPTION}))
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top