Jump to content
We've recently updated our Privacy Statement, available here ×

Variable in jasper studio


kmn
Go to solution Solved by kmn,

Recommended Posts

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=DISENR

For DISENROLLMENT STATUS(DISENROLLMENT INPROGRESS) – Display those members whose APPLICATION_STATUS not equal to CMSAPPR and APPLICATION_TYPE = DISENR

 

WE need to add two more statuses

1.       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

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

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

  • Solution

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 pm
WHERE a.member_member_id =mp.member_member_id
AND a.customer_id=pm.customer_id
AND $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_id
AND a.customer_id=pm.customer_id
 
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...