Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Convert a column to a row? Post Reply Post New Topic
Author Message
CindyS
Newbie
Newbie
Avatar

Joined: 29 May 2013
Location: United States
Online Status: Offline
Posts: 7
Quote CindyS Replybullet Topic: Convert a column to a row?
     Posted: 30 May 2013 at 6:19am
I have a weird report request, I don't think I can accommodate the requester but thought I would ask the experts. If I'm not being clear with my question, please let me know.
I successfully created a report in Crystal Reports 11 which includes, among other things, customer id, customer last name, customer first name, customer phone number, customer balance, then lists customer contacts (1 thru 9) and a few more fields after that. There are multiple tables involved. The resulting report shows the correct information however the requester wants to see the customer contacts (1 thru 9) individually in a separate column for each and not in a list (or vertically down) as displayed. There is no identifier in that table for each contact per customer, only a sequential id for the entire system. Meaning, I can't see a way to report column 6 with contacts from slot a, column 7 with contacts from slot b, and so on up to 9 contacts. I tried a crosstab but that didn't work either. I then copied the contacts field 8 times and tried process of elimination for each column with Selection Expert but since the contacts are all in one table it affects all contact columns equally.
I found info to convert rows to columns but not the other way around.
This particular report is being imported to another application and that is why the requester needs the report in columns. I don't think I can do it but want to exhaust all options before telling the boss 'no'.
Is there a way to list multiple bits of info from one field in a table separately across columns?
Thanks for any input.
IP IP Logged
bwsanders
Senior Member
Senior Member


Joined: 05 Sep 2012
Location: United States
Online Status: Offline
Posts: 177
Quote bwsanders Replybullet Posted: 30 May 2013 at 7:25am
have you tried making different formula fields for each contact type? you would then need to write each formula so that it only pulls back 1 contact per. like 1 for phone, 1 for email and so on.

just a thought.


IP IP Logged
CindyS
Newbie
Newbie
Avatar

Joined: 29 May 2013
Location: United States
Online Status: Offline
Posts: 7
Quote CindyS Replybullet Posted: 30 May 2013 at 7:50am
Thanks for your reply bwsanders, the customer contact field is a phone number and there can be up to 9 customer contact phone numbers per customer. I can do simple formulas but am not all that versed in complex ones so wouldn't know how to go about it.
IP IP Logged
bwsanders
Senior Member
Senior Member


Joined: 05 Sep 2012
Location: United States
Online Status: Offline
Posts: 177
Quote bwsanders Replybullet Posted: 30 May 2013 at 8:09am
you could look into separate formulas and do something like this

NthLargest(1, {customer.phone})

you'd have to do a formula for each phone number and change the number to which phone number you want.

that should get you in the right direction. 

IP IP Logged
CindyS
Newbie
Newbie
Avatar

Joined: 29 May 2013
Location: United States
Online Status: Offline
Posts: 7
Quote CindyS Replybullet Posted: 30 May 2013 at 8:36am
Thanks again bwsanders, that didn't work but it did make me think of something else
(sorry for the emoticon, if it's showing up, I clicked when I shouldn't have and now can't get rid of it)
IP IP Logged
bwsanders
Senior Member
Senior Member


Joined: 05 Sep 2012
Location: United States
Online Status: Offline
Posts: 177
Quote bwsanders Replybullet Posted: 30 May 2013 at 8:42am
no worries. i'm glad you got it figured out. 
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