Jump to content

Recommended Posts

Posted

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 STATUS
FROM 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_ID
WHERE 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.

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted

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}

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