asifvkd Posted January 29, 2008 Share Posted January 29, 2008 How can i filter a query while designing reports using ireport with a varialbe value retrieved from java program.Eg: select EmpName from Employee where EmpId="111"; In the above eg: value 111 is a string/int value from java program. Or how can I execute a query for particular userid which is generated after login with user name and password? Thanks,Asif K Link to comment Share on other sites More sharing options...
vk01 Posted February 1, 2008 Share Posted February 1, 2008 you can set up a parameter in your report. Pass the value from your java program something like this -- parameters.put("EmpID", empID);--Make sure that you have the same parameter name defined in the report as you would in the java program. Then use this parameter in your report query -- select * from employees where empid=$P{EmpID} 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