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

Need help to concatenate the values

Status
Not open for further replies.

42894

Technical User
Mar 16, 2008
11
0
0
US
Hi,

I am using CRXI.

In my report, the output coming like this.
ID Name Users Div1 Div2 Use
10 Smith XYZ-123 Info Devlopment 30
10 Smith ABC-000 Search Prod 40
10 Smith LMN-234 Med Info 100

Now i need output like this:
ID Name Users
10 Smith XYZ-123,ABC-000,LMN-234
Div1-Div2-use
Info,Devlopment,30
Div1-Div2-use
Search,Prod,40
Div1-Div2-use
Med,Info,100

I need everything in 1 line. Here because of the less space i put each Div1-Div2-use in next line.

I did grouping on ID.

Please help me. Thanks in advance

Aataman.
 
You can accumulate these in variables. Let's assume use is a number here. Create three formulas:

//{@reset} to be placed in the ID group header:
whileprintingrecords;
stringvar x;
stringvar y;
if not inrepeatedgroupheader then(
x := "";
y := ""
);

//{@accum} to be placed in the detail section:
whileprintingrecords;
stringvar x;
stringvar y;
x := x + {table.users}+",";
y := y + {table.div1}+","+{table.div2}+","+totext({table.use},0,"")+",";

//{@displayUsers} to be placed in the group footer:
whileprintingrecords;
stringvar x;
left(x,len(x)-1);

//{@displayDiv1Div2Use}:
whileprintingrecords;
stringvar y;
left(y,len(y)-1);

Drag the other fields into the group footer and then suppress the detail and group header sections.

-LB
 
Thak you so much!!

It works for me
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top