Adding Input Controls

Reports become dynamic when you add Input Controls, also referred to as Parameters, to your report. Illuminate provides three fundamental input controls that can be added to your reports. These input controls consist of:

academic_year

  • integer: displays date range (2014-2015) and passes the later portion of the academic year (2015)

active_sites

  • integer: displays the site name and passes the site_id to the report

active_users

  • integer: displays the user name and passes the user_id to the report

You also have the option to create two types of input controls:

  • Single Select List of Values: This is a static list of values you create that can be passed to your report.

  • Single Select Query: You can write any query that pulls data from the Illuminate database and generates results that can be passed into your report's SQL query.

After you write your SQL query, it is suggested to run the report with hard-coded values. Once your report is running locally on your computer, you can add the report to Illuminate and test in the web browser.

In the jrxml file you will add "Parameters" to make your queries dynamic. For example, if you ran the query:

SELECT "site_id", "site_name", "address", "phone1", "principal_name", "zip"
FROM "public"."sites"
ORDER BY site_name

If you add a parameter called active_sites to the query considered above it would look like this:

SELECT "site_id", "site_name", "address", "phone1", "principal_name", "zip"
FROM "public"."sites"
WHERE site_id=$P{active_sites}
ORDER BY site_name

Last updated