Accessing Data : Setting connection properties when a report runs : Setting the database user name and password at run time
 
Setting the database user name and password at run time
When a report accesses data in a database, a typical action is to prompt the report user to type his user name and password at run time. You accomplish this action by using report parameters. Report parameters provide a mechanism for getting values at run time and passing the values to the report. For more information about report parameters, see Enabling the User to Filter Data.
The following procedure shows how to create report parameters and bind the parameters to the user name and password properties in a JDBC data source.