Report Design
 Crystal Reports Forum : Crystal Reports .NET 2003 : Report Design
Message Icon Topic: one column rows to multiple columns Post Reply Post New Topic
Author Message
things_451
Newbie
Newbie
Avatar

Joined: 30 Sep 2015
Online Status: Offline
Posts: 2
Quote things_451 Replybullet Topic: one column rows to multiple columns
    Posted: 02 Oct 2015 at 7:08am




Thats how my data looks like in the report .Now,I need to change the report  data in one column to split into multiple columns.


Here in my report I have two columns EXPORT and Export_NAME. Export_Name has both NET,FIRM values.

I need to split my EXPORT into 2 columns
1.EXPORT where EXPORT_NAME ='NET'
2.EXPORT where EXPORT_NAME  ='FIRM'

If I do that each row is splitting into 2 rows..one for firm and one for net and creating a duplicate row.How do I avoid that?




Edited by things_451 - 02 Oct 2015 at 7:55am
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 15 Oct 2015 at 6:00am
1. Group by whatever is unique in each row.
2. Suppress the details and group header section.
3. Create two formulas that will look like this:

{@NET}
StringVar net_export;
if OnFirstRecord or {MyTable.GroupField} <> Previous({MyTable.GroupField} then net_export := '';
if {MyTable.EXPORT_NAME} = 'NET' then net_export := {MyTable.EXPORT};
net_export

{@FIRM}
StringVar net_firm;
if OnFirstRecord or {MyTable.GroupField} <> Previous({MyTable.GroupField} then net_firm := '';
if {MyTable.EXPORT_NAME} = 'FIRM' then net_firm := {MyTable.EXPORT};
net_firm

4. Put all of the data in the group footer section and use these formulas to get your two columns.

-Dell
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.031 seconds.