Archived discussions are read-only. Learn more about SAP Q&A

Crystal report: How to concatenate the string whilereadingrecords?

I have description field in the database and I need to concatenate the value of the filed into one line. How to do that? I tried as below

Stringvar strtitle="";


if Mid({OrderDtl.PartNum},1,2)="T3" Then

strtitle & "T3- Background Music,"

Else if Mid({OrderDtl.PartNum},1,2)="T6" then

strtitle & "T6- Dance"

This is not working and showing only last value instead of concatenated string. I am very new to Crystal report and i am using Crystal report 2008



  • SAP Moderator

Hi Raj,

I guess you're trying to concatenate the descriptions so that they appear on a single line, perhaps, on the report footer?

Try this formula:

stringvar strtitle;
strtitle := strtitle + ">" + {description_field_from_database}

The ">" sign is to separate the records from each other; you may choose to remove this from the formula or use another separator.

Place the above formula in the details section and suppress the section.

Create this formula to display the result and place it in the Report Footer section:

stringvar strtitle;

Let me know how this goes!


0 View this answer in context

Helpful Answer

Not what you were looking for? View more on this topic or Ask a question