Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Sum or Merge results from 2 CrossTabs Post Reply Post New Topic
Author Message
dspolans
Newbie
Newbie


Joined: 29 Dec 2011
Online Status: Offline
Posts: 3
Quote dspolans Replybullet Topic: Sum or Merge results from 2 CrossTabs
     Posted: 29 Dec 2011 at 4:17pm
Hi all,

1. Here is my data:

Field 1          Field 2            Field 3
Stop Type.....1st Officer......2nd Officer
Subject..........#1.......................*null
Traffic...........#2......................#1
Traffic...........#3......................#4
Subject..........#4.......................*null

2. I created two crosstabs of the data:

Field 2
1st Officer....Subject......Traffic
#1....................1................0
#2....................0................1
#3....................0................1
#4....................1................0

and...

Field 3
2nd Officer....Subject......Traffic
#1....................0................1
#2....................0................0
#3....................0................0
#4....................0................1


3. How do I sum or "merge" the data from the two crosstabs to create this
(I want this result)

Field 2 and 3
Officer.........Subject........Traffic
#1....................1................1
#2....................0................1
#3....................0................1
#4....................1................1

Edited by dspolans - 29 Dec 2011 at 4:21pm
IP IP Logged
kostya1122
Senior Member
Senior Member
Avatar

Joined: 13 Jun 2011
Online Status: Offline
Posts: 475
Quote kostya1122 Replybullet Posted: 30 Dec 2011 at 5:01am
you could try to create a formula like
if table.officer = [ 1st Officer,  2nd Officer] then "officer 1 and 2"
place it into crosstab
IP IP Logged
dspolans
Newbie
Newbie


Joined: 29 Dec 2011
Online Status: Offline
Posts: 3
Quote dspolans Replybullet Posted: 30 Dec 2011 at 5:06am
Thanks for the reply. Wouldn't that result with:

Officer.........Subject........Traffic
#1....................1................1
#1 #2...............0................1
#3....................0................1
#4....................1................1
#3 #4...............1................0
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