Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Get all rows Post Reply Post New Topic
Author Message
gimomars
Newbie
Newbie


Joined: 10 Sep 2012
Online Status: Offline
Posts: 2
Quote gimomars Replybullet Topic: Get all rows
     Posted: 10 Sep 2012 at 9:47pm
Hi experts,

I need your help, I want to display all rows as 1.
For example in report Details:

ID
5
6
7
8

But instead of row. They should me. 5,6,7,8 in one text object. Here's my formula, but this is not correct. Please help.

Local numberVar oLoop ;
Local numberVar oCount := COUNT({vw_DSPR.Code});
Local stringVar oSerial := "";

For oLoop := 1 To oCount Do
    (
       oSerial := ToText({vw_DSPR.Serial}) + "," + oNextSerial;       
    );
oSerial;



Regards,

IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 11 Sep 2012 at 4:47am
what I would do is:
in the detail section create a formula like:
 
shared stringvar all;
all := all + ", " + {table.field};
 
suppress the detail section,
in the report footer have a formula like:
shared stringvar all;
mid(all, 3)     //strips off the leading ", "
 
HTH
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