Print Page | Close Window

Combining rows of data into a single value

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Tips and Tricks
Forum Discription: Have you learned some great tricks to share with the group? Post them here!
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=18503
Printed Date: 17 May 2024 at 7:14pm


Topic: Combining rows of data into a single value
Posted By: amender
Subject: Combining rows of data into a single value
Date Posted: 13 Jan 2013 at 10:26pm
I have a data as below:

ID DetailID from To

1   202          A        B
2   202          B        C
3   202          C        D
4   202          D        E


I would like to combine it as "A/B/C/D/E" into a single value for 202(DetailID).

result that I needed:

DetailID from/To
202       A/B/C/D/E    


Thanks in advance.



Replies:
Posted By: Baratier
Date Posted: 11 Mar 2013 at 9:05am
I have a similar issue. have you found a solutuion?


Posted By: Sastry
Date Posted: 18 Mar 2013 at 1:15am
Hi
 
Insert a group on DetailID and use below formulas :
 
 
//Place the below on your group header
Whileprintingrecords;
Stringvar ft:=' ' ;
 
//Place this formula in detail section
Whileprintingrecords;
Stringvar ft:=ft+'/'+From;
 
//Place below formula in your group footer
 
Whileprintingrecords;
Stringvar ft;
 
Now this group footer will display A/B/C/D/E , add group name before to it and suppress all sections except group footer.
 
 
 


-------------
Thanks,
Sastry



Print Page | Close Window