Report Design
 Crystal Reports Forum : Crystal Reports .NET 2003 : Report Design
Message Icon Topic: Converting rows to columns Post Reply Post New Topic
Author Message
Erinmichelle
Newbie
Newbie
Avatar

Joined: 06 Nov 2009
Location: United States
Online Status: Offline
Posts: 24
Quote Erinmichelle Replybullet Topic: Converting rows to columns
    Posted: 10 May 2011 at 10:31am
Hello,

I have a table that is set up funky.  I really need one of the set of values (currently in one column) to be the column headers.  Here is a sample of my data:

ID           pq_li   dt_li    detail_value
12279    553      1              79
12280    553      2              TABLET
12281    553      3              P 97910
12282    553      4              6109101034
12311    554      1              80
12312    554      2              TABLET
12313    554      3              P 98457
12314    554      4              6109101034
12377    556      1              82
12378    556      2              TABLET CHEWABLE
12379    556      3              P 97933
12380    556      4              6109099195

As you can see, for each unique value in pq_li, there are four different detail_values which are each categorized by dt_li.  What I really want is to have the headings of: ID, pq_li, 1, 2, 3, 4, detail_value so that there is only one row for each pq_li value.  How can I make this appear in Crystal? Your help is appreciated!


Edited by Erinmichelle - 10 May 2011 at 10:31am
Thanks!

Erin
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 16 May 2011 at 3:56am
well, create shared variables for each value you want in the row.
in the detail section of the report, place the values into the appropriate shared variable.  Once you are comfortable that the values are being updated correctly, suppress the detail section. 
 
Create accessor formulas to view the shared variables and place them as desired in the group footer, viola, the rows have been pivoted.
 
You may want to reset the variables in the group header in case a value is missing.
 
HTH
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.016 seconds.