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

combine two fields into one filed in crystal report

Status
Not open for further replies.

mhs377

Programmer
Aug 10, 2010
21
IR
I am using VS2008 and I'm new to crystal report

In my program there are some fields for saving phone numbers
for any records.

when I enter two numbers for home number(for instance) ,in my report it shows the data into two records and i want it to be in a single row for reporting

how can I do that?

thanks in advance
 
If you group on the phone owner field (ID or name), then you can create formulas like these:

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

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

//{@display} for the group footer:
whileprintingrecords;
stringvar x;
if len(x) > 2 then
left(x,len(x)-2)

Place the other fields you want displayed in the group footer and then suppress the group header and details section.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top