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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Concatenate comments for a contract - multiple records. 1

Status
Not open for further replies.

MB57630

Programmer
Jan 29, 2010
5
US
I have a report that is pulling several thousand contract records because the comments create a new record each time they are entered. I would like to concatenate the comments into a single record.....at least the first 5 comments.

I found the following solution and it would have worked but it exceeds a limit of 65,000+ records. I need to know if there is another way to do this without worrying about a limit??? Help please!

Insert a group on salesnum and then create three formulas:

//{@reset} for the group header:
whileprintingrecords;
stringvar x;
if not inrepeatedgroupheader then
x := "";

//{@accum} to be placed in the detail section:
whileprintingrecords;
stringvar x := x + {table.SText}+" ";

//{@display} to be placed in the group footer:
whileprintingrecords;
stringvar x;
trim(x);

Then suppress the group header and detail section.

MB
 
You wouldn't hit the limit unless your group was very large, so I'm wondering if you are resetting at the correct group level. Do you have more than one group? What fields are you grouping on. Do you mean you only want the first five comments within a group?

-LB
 
I have the report grouped only by contract.The multiple comments are at the contract level and I set up the formulas as suggested in the comments. It is a large report with many contract details but I only need the first 5 lines of the comment section. I am using CR2008.
 
Then change these formulas:

//{@accum} to be placed in the detail section:
whileprintingrecords;
stringvar x;
numbervar cnt := cnt + 1;
if cnt <= 5 then
x := x + {table.SText}+" ";

//{@reset}:
whileprintingrecords;
stringvar x;
numbervar cnt;
if not inrepeatedgroupheader then (
x := "";
cnt := 0
);

-LB

 
You are teh MAN!! or woman......lol....thanks so much!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top