Is it possible to pass a variable from php to a report on a JasperReports server? For example, in my php application, I save the department_id file in a session variable. I would like to pass department_id to my reports running on the JasperReports server and display information suitable for that department. in iReport I have a request like: SELECT * FROM employees WHERE department_id = $P{dept_id_from_php}but I need to create a drop-down list to pass the dept_id parameter.
The end result is that I would like the user to log in to my PHP application to view the employee information related to the department to which the registered user belongs. I do not want to pass this through a request, because the user can simply change the identifier in the query line and access information from other departments. Ideally, I would like to pass this parameter only once, and then reuse it in all reports, such as a global variable.
Is it possible?
source
share