hi i am using this sp in crystal report but it returns values of 2nd query only but i want values of 1st and 2nd query
create procedure [dbo].[get_finalcash]
(@regdno varchar(25),
@total money,
@advance money,
@deduction money,
@netamount money,
@todate datetime,
@paid money,
@due money,
@head varchar(25))
as
begin
if(@head='Room Rent')
begin
select f.regdno,f.name,f.doa,f.time,f.advance,f.dod,f.time1,f.billno,e.rddp,e.napa,e.na,e.total from finalbill f
inner join efinalbill e on f.regdno=e.regdno where f.regdno=@regdno
end
else
begin
select sum(e.total) as Total,regdno,head from efinalbill e
where e.regdno=@regdno and e.head=@head group by e.regdno,e.head
end
end
Thanks&Regards
LakshmiNarayana Nalluri.