views:

177

answers:

1

Is it possible to pass a variable from php to a report in JasperServer? For example, in my php application I keep the department_id stored in a session variable. I would like to pass the department_id over to my reports running on JasperServer and display the information appropriate for that department. in the iReport I have a query like: "SELECT * FROM employees WHERE department_id = $P{dept_id_from_php}", but I have to build a dropdown select list to pass the dept_id parameter.

The end result is I would like the user logged into my PHP application to view the employee information that is related to the department the logged-in-user belongs to. I don't want to pass this over using the querystring because the user could just change the id in the querystring and have access to other departments information. Ideally I would like to only pass that parameter once, then reuse it in all the reports, like a global variable.

Is this possible?

A: 

Hello Ronedog,

I have exactly the same problem as you, have you found a solution for this? or have some clues?, thanks in advance.

Daniel
I wish...Trying OpenReports now to see what it can do to help me
Ronedog