Passing credentials to BIRT reports at run time

Special configuration is required to build BIRT reports that allow user credentials to be passed or entered at run time. This section describes how to define HCL Compass data sources in BIRT that allow for user and password information to be passed as invocation parameters by the Report Launcher at runtime.

Before you begin

The parameter names for username and password credentials specified in the BIRT report design must match the parameter names defined in the Report Launcher configuration file: reportlauncher.properties. The default configuration for these parameters is:
reports.launcher.birt.userParameterName=UserId
reports.launcher.birt.passwordParameterName=Password
If you specify different parameter names in the BIRT report design, you must update the values in the Report Launcher configuration file to match the names in the report design.

Procedure

To grant access to a group of users:
  1. Define the parameters.
    1. Open the target report.
    2. Click the Data Explorer tab.
    3. Select Report Parameters. Then, right-click and select New parameter from the context menu.
    4. Type the name for the parameter, UserId for example.
    5. Customize the parameter as desired.
      Most settings effect how the parameter is displayed by the BIRT parameter prompter.
    6. When finished, click OK.
    7. Repeat the steps above to define the Password parameter.
      Tip: Select the Do not echo input parameter setting to hide password characters in the BIRT parameter prompt view.
  2. Update the HCL Compass Query Data Source to use parameters.
    1. Select the target HCL Compass data source. Then, right-click and select Edit from the context menu.
    2. From the Edit Data Source dialog, select Property Binding.
    3. For User Name, click the button to the right of the text box.
    4. From Expression Builder Category list, select Report Parameters.
    5. From the Sub-Category list, select ---All---.
    6. Double-click the UserId item to create the parameter expression.
    7. Click OK to save the parameter retrieval code.
    8. For Password, click the button to the right of the text box.
    9. From Expression Builder Category list, select Report Parameters.
    10. From the Sub-Category list, select ---All--- .
    11. Double-click the Password item to create the parameter expression.
    12. Click OK to save the parameter.
  3. Verify Report Launcher parameter names.
    Confirm that the username and password parameter names configured in the BIRT report design match the values specified in the Report Launcher configuration file.reportlauncher.properties.