Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Format Column to row Post Reply Post New Topic
Author Message
rmatyjasik
Newbie
Newbie


Joined: 02 Oct 2009
Online Status: Offline
Posts: 2
Quote rmatyjasik Replybullet Topic: Format Column to row
     Posted: 02 Oct 2009 at 5:19am
I would like to be able to format some of my data in a row separated by commas.  In my data, I have the name of a person and dates associated with them like this:
 
Joe Schome, 9/13/2009
Joe Schmoe, 9/15/2009
Jane Doe, 9/15,2009
Joe Schmoe, 10/1/2009
 
What I would like is for the name and dates to all show up on one row with commas separating the dates like this:
 
Joe Schmoe         9/13, 9/15, 10/1
Jane Doe             9/15
 
How can I string these values together to make it look like that? 
This may be a very simple thing to do, but I am fairly new to using Crystal.
Thanks
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 02 Oct 2009 at 6:16am
Simple after you have done it a few times ;)
 
Shared variables...3 formulas
group header:
shared stringvar sName :="" //reset the variable
 
group footer:
shared stringvar sName  //display the variabe
 
detail secton:
shared stringvar sName;
if len(sName) <> 0 then
  sName := sName + ", ";
 
sName := sName + totext({table.field}, "M/d");  //add the date to the string
""//to hide the formula, not needed if you are suppressing the section
 
 
All done, not too bad
 
HTH
IP IP Logged
rmatyjasik
Newbie
Newbie


Joined: 02 Oct 2009
Online Status: Offline
Posts: 2
Quote rmatyjasik Replybullet Posted: 05 Oct 2009 at 5:19am
Thanks alot.  Worked well.
IP IP Logged
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