Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: a specified group with no values Post Reply Post New Topic
Author Message
zakal1983
Newbie
Newbie


Joined: 24 Nov 2009
Online Status: Offline
Posts: 8
Quote zakal1983 Replybullet Topic: a specified group with no values
    Posted: 28 Dec 2009 at 9:19am
Hi all,
 
If group is specified in certain categories, some specified group categories does not appear on the report when it has  0 value.
 
For example, there are three categories saying "A", "B", and "C".
The report should look like this,
       male      female
A      5           10
B      3            8
C      0            0
 
but, the actual CR report looks like,
 
       male      female
A      5           10
B      3            8
 
without "C".
 
How should I design my report to show "C" which has 0s?
 
 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 28 Dec 2009 at 9:38am
Your source data needs to include "C".
Make sure your joins and select statement do not exclude the "C" value once it is included in your source.
 
Also, if you have more than one table and are outer joining make sure when you group that you group on field from the correct table (the table with all your values).  


Edited by DBlank - 28 Dec 2009 at 9:58am
IP IP Logged
zakal1983
Newbie
Newbie


Joined: 24 Nov 2009
Online Status: Offline
Posts: 8
Quote zakal1983 Replybullet Posted: 28 Dec 2009 at 12:03pm

Thanks for your reply DBlank

My joins and select statement do not exclude the "C" value.
The problem is the group order(?) is specified as "A", "B", and "C", and each condition type value is 1, 2, and 3 respectively (for example).
say, if there is no 3 type values in DB table then "C" does not show up as mentioned in the qestion.
 
Simply, how would I show "C" on the report even though there is no such "C" related value so that the report look like:
       male   female
A        5          3
B        2          1
C        0          0
 
Thanks
 
 
 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 28 Dec 2009 at 12:28pm
Sorry, not quite following your set up here.
I do not know what you mean by "each condition type value is 1, 2, and 3" .
You did a group by on FIELD_1
In a specified order
with a specified order select FIELD_1=1 as "A"
with a specified order select FIELD_1=2 as "B"
with a specified order select FIELD_1=3 as "C" ?
 
If so what I was saying still applies except it means your source has to include the original data of FIELD_1 with all 3 values (1,2,3).
 
 
IP IP Logged
zakal1983
Newbie
Newbie


Joined: 24 Nov 2009
Online Status: Offline
Posts: 8
Quote zakal1983 Replybullet Posted: 28 Dec 2009 at 4:26pm

Sorry about my vague explanation. 


let me give you the detail example,
DB table has
 
FIELD_1
SEX
VALUE
DATE
 
FIELD_1 includes (1, 2, 3) .
Assume that report takes selection and join properly.
The reports takes start and end date parameters.
Given start and end date interval, FIELD_1 includes only (1, 2) not 3.

I need a report that looks like
  male female
A  3        3
B  3        3
C  0        0

but I get
  male female
A  3        3
B  3        3

 

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 28 Dec 2009 at 5:47pm
It is your start and end date parameters. That filter is causing your datga to exclude the "C" value.
Assuming you do not have the rights to create a stored procedure and can pass your date params down to it here is a link for another solution.
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.029 seconds.