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

Concatenate multiple text fields from different detail lines

Status
Not open for further replies.
Apr 11, 2008
68
GB
I am designing a report that shows customer service callout summaries. The data is well structured into various tables that link together fine.

I am now up against a problem where the text typed relevant to a given 'memo' on the customer service record is broken into lines and stored in a table as:

EventID Line No. Text
76253 1 This is my problem. The
76253 2 data is stored in separate
76253 3 lines that I am struggling
76253 4 to combine.

Now when I link the EventID in the main report table to this textstore table, using the EventID field, I get 4 detail lines. I need to find a way to combine these so that each EventID simply shows the relevant text as a block, no matter how many lines there may be.

I'm using CR2008.

Thanks in anticipation.
 
Maybe. My thought would be that you group by EventID, but you would need to create formulas that would build the Text. Something like the following
GH section - shared stringvar sometext := ""
Detail section - shared stringvar sometext;
sometext := sometext & {Text}
GF section - shared stringvar sometext;
sometext;

I hope this helps.
 
I would group on EventID and then suppress the group header and details...then..

use an accumulation formula in the details sections to create the data.
//{@TextTogether}
stringvar ttg;
ttg := ttg + {table.field]

In afooter section use a display formula to show the information.
//{@TextDisplay}
stringvar ttg;
ttg

You will also want a reset in a header
//{@TextReset}
stringvar ttg;
ttg := ""

 
Thanks kray4660 and fisheromacse

I've tried both routes without complete success, but that is probably me! Currently have it grouped on EventID with:

Group EventID Header:

//{@TextReset}
stringvar ttg;
ttg := ""

Detail:
//{@TextTogether}
stringvar ttg;
ttg := ttg + {csc_textstore.text}

Group EventID Footer
//{@TextDisplay}
stringvar ttg;
ttg

All I'm getting is blank header and footer, with the growing text in the detail line. It is also adding every line of text, rather than resetting when the EventID changes.

Any ideas?

Thanks
 
sorry, my mistake.
add "WhilePrintingRecords" to the each formula above the 1st line.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top