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

Help with formula

Status
Not open for further replies.

BlurredVision

Technical User
Aug 6, 2001
326
GB
I am looking for a formula that will take the description of the record and combined the descriptoin when a matching record ID is found - My data looks something like this

Description Record_ID
----------- -----------
Primary 37
Secondary 83
Billing 28
Campus 37
Primary 82

I would need to pull together the Description into a single string where the Record_ID's match

Using Record_D 37 as an Example, my output would need to look like this: "Primary, Campus"

I am running CR v10..

Thanks for any help given..

 
Group by the record_id.

then use the 3 formula method:

Group header formula:
whileprintingrecords;
stringvar Output:="";

Details formula:
Group header formula:
whileprintingrecords;
stringvar Output:=Output+{table.description}+", ";

Group footer formula:
whileprintingrecords;
stringvar Output;
if len(output) > 1 then
left(Output,len(output)-2)
else
"No description available"

-k
 
Thanks for your help.. I see that this will join all descriptions together.. I am only looking to join the descriptions where the record_id's match..
 
If you insert the group as SV suggested, and then place the reset formula in the group header, the results will only be for a specific ID.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top