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

Concatanate or join formula

Status
Not open for further replies.

luxvivens

Technical User
May 20, 2010
27
CA
There may be muliple procedures on a surgical case.

"Procedure Dsecription" is the procedure name.

There is another field named "Procedure Number" which corresponds to the Procedure Description Procedure1, Procedure2). I don't need that number, but it may be of value if it helps in creating a formula.

When my report runs it lists each new unique procedure name on a new row.

For example:

1 Fusion Anterior
2 Fusion Posterior

Does anyone know a formula that I might use that adds "Procedure Description1" to "Procedure Description2" so that the results appear as:

Fusion Anterior Fusion Posterior (in one field, rather than in mulitple rows).

I am using CR 10.
Thanks in advance.
 
concantating is very easy in crystal. In the following example I take a po number and add "BJS" to the fron to crete a new field,, "BJS"+{@ponum}. It is just that easy. depending on if you have an "blanks", after the description, you might need to trim the first field, down to the proper format.
 
First group on surgical case. Then create these formulas:

//{@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.procedurename}+" ";//adjust spaces as necessary

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

Drag the groupname into the group footer and then suppress the group header and details section.

-LB
 
Perfect LB. Works like a charm !!! Much appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top