Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Horizontal Data set Post Reply Post New Topic
Author Message
LeeHuck
Newbie
Newbie
Avatar

Joined: 28 Jul 2011
Location: United Kingdom
Online Status: Offline
Posts: 5
Quote LeeHuck Replybullet Topic: Horizontal Data set
     Posted: 28 Jul 2011 at 4:12am
Hi,

Hopefully I can explain myself correctly here. I have a report that produces a list of new clients added to a database after user defineddate, all this works fine with no problems. However in the database "atributes" are recorded against each client, each atrribute has its own description. When I add the attribute description to the details section, as you would expect it add 1 line per entry in the database.

e.g

Client             Date               Attribute
John Smith      01/07/2011      Atrib 1
John Smith      01/07/2011      Atrib 2
John Smith      01/07/2011      Atrib 3

What I need to do in the details section is display the data such as:-

Client             Date               Attribute
John Smith      01/07/2011     Atrib 1, Atrib 2, Atrib 3

I have tried everything i can think of without sucess.

Notes,
There are a total of 126 different attributs on the database, not more than 6 on any record.
Attribute field is a String(21)

Hopefully this is possible, thanks for any suggestions in advance.

Lee


IP IP Logged
LeeHuck
Newbie
Newbie
Avatar

Joined: 28 Jul 2011
Location: United Kingdom
Online Status: Offline
Posts: 5
Quote LeeHuck Replybullet Posted: 28 Jul 2011 at 4:27am
As an update I have tried this code as a formula and it isnt producing reliable results.

whileprintingrecords;
shared stringvar X:= X + {TBL_Attributes.Description} + ", "

For some reason I can't explain the attributs are duplicating on certain records.

Lee


Edited by LeeHuck - 28 Jul 2011 at 4:27am
IP IP Logged
comatt1
Senior Member
Senior Member
Avatar

Joined: 19 May 2011
Online Status: Offline
Posts: 337
Quote comatt1 Replybullet Posted: 28 Jul 2011 at 4:29am
if you group by Client, you could use shared variable.

Personally I would probably build a database function I could call from Crystal, but I am not sure the limitations you are working with.



IP IP Logged
CircleD
Senior Member
Senior Member
Avatar

Joined: 11 Mar 2011
Location: United States
Online Status: Offline
Posts: 251
Quote CircleD Replybullet Posted: 28 Jul 2011 at 12:46pm
Originally posted by LeeHuck

As an update I have tried this code as a formula and it isnt producing reliable results.

whileprintingrecords;
shared stringvar X:= X + {TBL_Attributes.Description} + ", "

For some reason I can't explain the attributs are duplicating on certain records.

Lee


If that's working but showing some duplicates then try "Format Field" and check the box "Suppress if Duplicated" and see if that doesn't fix it.
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