Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Reporting Services Development
 To add a column for existing report

Author  Topic 

mrm23
Posting Yak Master

198 Posts

Posted - 2008-10-14 : 08:34:35
Hi,
I have a report which gives the details of a project.
Now one more column is to be added which gives the count of Trainees in each project.

query should be something like:
select count(e.emp_seq_no) from employee e
inner join rpmg_resource_allocations rra on
rra.emp_seq_no = e.emp_seq_no
inner join project p on p.prj_seq_no = rra.prj_seq_no
where rra.rra_proj_member_status = 'TSE'

But i cant add this condition directly in the where clause as other columns will be affected.
Is there any way i can do this?
Can i use case?

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-10-14 : 08:53:07
just include column e.emp_seq_no in your query and do the condition check inside report container cell. it will be something like
=COUNT(IIF(Fields!rra_proj_member_status.value= "TSE",Fields!emp_seq_no.value,Nothing))


Go to Top of Page

mrm23
Posting Yak Master

198 Posts

Posted - 2008-10-16 : 08:41:03
hi thanks for your reply.
I could not use the same but made use of the logic and it is working fine.
thanks for your suggestion
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-10-19 : 05:29:11
quote:
Originally posted by mrm23

hi thanks for your reply.
I could not use the same but made use of the logic and it is working fine.
thanks for your suggestion


why you couldnt use it? was there any error?
Go to Top of Page
   

- Advertisement -