dominic92697 Posted October 19, 2015 Posted October 19, 2015 Hi, I am new to iReport. I need to prompt the user with more than one parameter when they run their reports.For example, the user will be prompted to enter the UNIQUE_ID, MGMT_NO and STATUS.My oracle sql script is:SELECT DISTINCT D."UNIQUE_ID" AS UNIQUE_ID, M."MGMT_NO" AS MGMT_NO, ST."STATUS" AS STATUSFROM TB_DETAILS D LEFT JOIN TB_MGMT_NO MG ON D.UNIQUE_ID = MG.UNIQUE_ID LEFT JOIN TB_STATUS ST ON D.UNIQUE_ID = ST.UNIQUE_IDWHERE D."UNIQUE_ID" = $P{UNIQUE_ID}How do I add the other two parameters, MGMT_NO and STATUS, to the WHERE statement above?Thank you.
hozawa Posted October 19, 2015 Posted October 19, 2015 Just create 2 more parameters - MGMT_NO and STATUS. Use $P{MGMT_NO} and $P{STATUS} in your sql where they are needed e.g. add them to the WHERE clause: WHERE D."UNIQUE_ID" = $P{UNIQUE_ID} AND M."MGMT_NO" = $P{MGMT_NO} AND ST."STATUS" = $P{STATUS}
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