anarchy-rabbit
Well-Known Member
- Joined
- May 17, 2009
- Messages
- 113
- Reaction score
- 0
Hi
I'm busy with my final year project and now I'm having trouble generating a crystal report, I have the following "Client" table:
Now I have the following Views and Stored Procedure:
So what I'm trying is creating 2 views, one for the males count and one for the females count, then I'm using a stored procedure that retrieves the count from the views in 2 seperate columns.
However, when I try to create a crystal report, with a pie chart, it only shows either the males or only the females in the pie chart.
Does anyone perhaps have any ideas o fixing this?
Thanks
I'm busy with my final year project and now I'm having trouble generating a crystal report, I have the following "Client" table:
Code:
CREATE TABLE Client
(
Client_ID int PRIMARY KEY Identity(1000,1) NOT NULL,
Client_Name varchar(20),
Client_Surname varchar (30),
Client_Tel_h varchar(10),
Client_Tel_c varchar (10),
Client_Pass varchar(5),
Client_Gender varchar(1),
Client_IDNo varchar(13),
Client_Blacklisted bit,
AccOpen_Date datetime,
Client_StreetName varchar (40),
Client_AreaCode varchar(5),
Client_RemainingBalance float(10),
Title_ID int references Title(Title_ID),
Suburb_ID int references Suburb(Suburb_ID),
City_ID int references City(City_ID),
)
GO
Now I have the following Views and Stored Procedure:
Code:
create view Gender_M
as
select Count(Client_Gender) as Males
from client
where Client_Gender = 'M'
go
Create View Gender_F
as
select count(Client_gender) as Females
from client
where client_gender = 'F'
go
---------------------------------------------------------
Create Procedure SP_DemographicReportGender_Sel
(
@StartDate as datetime,
@EndDate as datetime
)
as
select B.Females, A.Males
from Gender_M as A, Gender_F as B, Client as C
where c.AccOpen_Date between @StartDate and @EndDate
GO
However, when I try to create a crystal report, with a pie chart, it only shows either the males or only the females in the pie chart.
Does anyone perhaps have any ideas o fixing this?
Thanks