Talk with the Author
 Crystal Reports Forum : General Information : Talk with the Author
Message Icon Topic: Concatenate Details Post Reply Post New Topic
Author Message
Lord Yorkshire
Newbie
Newbie
Avatar

Joined: 04 Jul 2010
Online Status: Offline
Posts: 28
Quote Lord Yorkshire Replybullet Topic: Concatenate Details
    Posted: 29 Oct 2013 at 12:48am
I have a report where i wish to concatenate the answers i recevie.
 
These are all at Detail Level and the report looks like this
 
Header
Panel Num Score
 
Details
1             164
2             535
3             164
 
i want to end up with a string that says"164+535+164"
 
This could be upto a maximum of 10 scores but i only want to show the appropriate number, i dont want "164+535+164+0+0+0+0+0+0+0"
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 29 Oct 2013 at 4:29am
I would create a formula to go in the details something like this.
shared stringvar somestring;
if onlastrecord then
 somestring := somestring + {stringval}+"+"
else
  somestring := somestring

Then have another formula in the report footer
shared stringvar somestring;

If you are grouping the data, you probably would put the second formula in the GF, but then you will need another formula to reset the string to nothing in the GH (example:  shared stringvar somestring :="";)
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.047 seconds.