how to add case statements in jasper domain

Hi

Here i am creating a jasper domain. I applied joins accordingly but now i stuck at two places,

1) I dont know how to apply case Statement conditions in domain filters. Here is my sample query

select count(distinct CASE WHEN activity.activity LIKE '%: Phone Appt. Set' THEN p.cid END) as phone_appt_set
from activity,people p ,dbo.job_prof jp, jobs j,profilestatus
where activity.reference = $P{jobTitle} and jp.profilestatus_id=profilestatus.profilestatus_id and activity.cid = p.cid
and jp.reference = j.reference and p.cid = jp.cid and activity.deleteflag = 0 and jp.DeleteFlag = 0 and p.DeleteFlag = 0
and j.DeleteFlag = 0

please help me how (Syntax) to write case statements and where it write i am confused to add filters or to write it in calculated fields?

dasari16's picture
Joined: Nov 7 2012 - 9:35pm
Last seen: 1 year 9 months ago

1 Answer:

Please give the information about output that you want from your query, and also give information about your table structure and columns.

Anuj Dudhakawale's picture
Joined: Dec 20 2012 - 11:27pm
Last seen: 10 years 3 months ago
Feedback
randomness