kmn Posted June 15, 2016 Share Posted June 15, 2016 I want to implement this Also For DISENROLLMENT STATUS (DISENROLLED)- Only those members need to be displayed who are in APPLICATIONS table with APPLICATION_STATUS = CMSAPPR and APPLICATION_TYPE=DISENRFor DISENROLLMENT STATUS(DISENROLLMENT INPROGRESS) – Display those members whose APPLICATION_STATUS not equal to CMSAPPR and APPLICATION_TYPE = DISENR WE need to add two more statuses1. DISENROLLMENT CANCELLED – Display those members whose APPLICATION_STATUS is CMSAPPR and APPLICATION_TYPE=’CANDISENR’2. DISENROLLMENT CANCELLATION INPROGRESS – Display those members whose APPLCIATION_STATUS is not equal to CMSAPPR and APPLICATION_TYPE=’CANDISENR’ Variable added :Datatype: java.lang.Double ($F{APPLICATION_STATUS}.equals( "CMSAPPR " )&& $F{APPLICATION_TYPE}.equals( "DISENR" )?"DISENROLLED":"DISENROLLMENT INPROGRESS")||($F{APPLICATION_STATUS}.equals( "CMSAPPR " )&& $F{APPLICATION_TYPE}.equals( "CANDISENR" )?"DISENROLLMENT CANCELLED":"DDISENROLLMENT CANCELLATION INPROGRESS ") But this shows error :The operator || is undefined for the argument type java.lang.string Link to comment Share on other sites More sharing options...
gururagavan2008 Posted June 16, 2016 Share Posted June 16, 2016 Try something like this:$P{param1}.equals("VERY LESS") ? ("ApplicationID < 10 & ApplicationCount < 5") : ($P{param1}.equals("MODERATE") ? ("[ApplicationID] < 100 & ApplicationCount < 5") : ("[ApplicationID] < 1000 & ApplicationCount < 5"))and append this to your SQL. Here param1 will be your status parameter. Link to comment Share on other sites More sharing options...
Solution kmn Posted June 20, 2016 Author Solution Share Posted June 20, 2016 i used it in query instead of a variable select DISTINCT pm.plan_id,mp.DISENROLLMENT_REASON_CODE ,a.member_member_id,mp.plan_start_date,mp.plan_end_date,a.APPLICATION_STATUS,a.application_type,CASE WHEN a.application_Status='CMSAPPR' AND a.APPLICATION_TYPE= 'CANDISENR' THEN 'Disenrollment Cancelled' ELSE '' END AS DISENROLLMENTSTATUS from applications a,member_plans mp,product_master pmWHERE a.member_member_id =mp.member_member_idAND a.customer_id=pm.customer_idAND $X{IN,PLAN_ID,PlanID}UNION select DISTINCT pm.plan_id,mp.DISENROLLMENT_REASON_CODE ,a.member_member_id,mp.plan_start_date,mp.plan_end_date,a.APPLICATION_STATUS,a.application_type,CASE WHEN a.application_Status<>'CMSAPPR' AND a.APPLICATION_TYPE= 'CANDISENR' THEN 'Disenrollment Cancellation In Progress' ELSE '' END AS DISENROLLMENTSTATUS from applications a,member_plans mp,product_master pm WHERE a.member_member_id =mp.member_member_idAND a.customer_id=pm.customer_id Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now