Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Cross Tabs - Defaulting for non existant rows? Post Reply Post New Topic
Author Message
AntDC
Groupie
Groupie
Avatar

Joined: 23 Dec 2008
Online Status: Offline
Posts: 76
Quote AntDC Replybullet Topic: Cross Tabs - Defaulting for non existant rows?
     Posted: 27 Feb 2009 at 3:44am
I have a cross tab....
Columns A, B, C
Rows X, Y, Z with a value in each
Data something like....
A  X  10
A  Y  11
A  Z  12
B  X   1
B  Y   2
B  Z   3
C  X   100
C  Z   200

Notice that for column C, there is no value for row Y.  Actually, this row does not exist in the data.
However, the cross tab is defaulting (i think) and showing this value as 0.00.
I want to be able to display something like a dash or NA for rows which do not exist.
So my cross tab would look some thing like this..
     A     B     C
X   10    1      100
Y   1     2      --
Z   100   3      200

Is this possible and if so, how can I do that?

Thanks

IP IP Logged
rahulwalawalkar
Senior Member
Senior Member
Avatar

Joined: 08 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 731
Quote rahulwalawalkar Replybullet Posted: 27 Feb 2009 at 5:20am
Hi
 
Right Click the cell where 0.00 is displayed then select format field then in common tab against Display String :X+2 enter the code below
 
if currentfieldvalue = 0 then
'--'
else
totext(currentfieldvalue)
 
Cheers
Rahul
IP IP Logged
AntDC
Groupie
Groupie
Avatar

Joined: 23 Dec 2008
Online Status: Offline
Posts: 76
Quote AntDC Replybullet Posted: 27 Feb 2009 at 5:22am
The problem with that is that there might be a row set as zero.  Which is valid.

I don't ant it to display zeros for rows which aren't actually there.

Regards

DC
IP IP Logged
rahulwalawalkar
Senior Member
Senior Member
Avatar

Joined: 08 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 731
Quote rahulwalawalkar Replybullet Posted: 27 Feb 2009 at 5:43am
Hi
 
Not Clear ,What you are trying to say ,but actually the value is cell value for intersection of row and column so even though for C their is no value their are values for Columns A and B for  Rows X Y .
 
Cheers
Rahul
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