password protected report concept locks

Synopsis

This article covers how to allow access to a report with a password challenge prompt, creating a password protected report.

Overview

Security in Cognos is extremely robust, letting you permit or deny access to data elements on a package, data source, or even row level in a Database. Normally, standard group permissions conveniently control report execution access for most situations, but certain business applications may require a select subset of users to run a report who may not all be in the same group. In lieu of adding a separate group and assigning those users to it, a report can start with a prompt page with a password challenge response that allows only users with a valid password to run the report.

Solution Summary:

1) Create the report using Report Studio:

Example:

Revenue Example

2) Add a Prompt Page and drag a Text Box Prompt object into a Block on the page:

Text box prompt
3) Change the prompt’s name from Parameter1 to something meaningful that associates it with the page’s purpose (e.g. Password Protected Report Answer)

4) Augment the page with a text item containing instructions for the user (e.g. “Enter Password:”) and drag and drop a Finish button into the block that holds your text prompt.

Enter password

5) Return to Page 1 of your report and add a Boolean Variable expression using the Condition Explorer.

Variable
6) Create an expression that will evaluate the answer typed on the Prompt Page and compare it to a value that is hard-coded between single quotes by doing the following:

a) Switch to the Parameters tab
b) Drag the prompt into the Expression Definition field.
c) Type/Add: = ‘SecretPassword’ after the automatically generated function
Note: This is where the passed-in typed password Parameter on the Prompt Page is checked for a match against the correct password
d) Validate the expression.

Report Expression

7) Return to the Page Explorer and select Page 1.

8) From the Toolbox, drag and drop a Conditional Block object onto the report page.

Conditional Block

9) Associate the expression created in steps 5 and 6 with the Conditional Block as follows:

a) Go to and select Properties > Block Variable.
b) Double-click Block Variable.
c) Choose Boolean 1 from the dropdown menu.
d) Click OK.

10) The current state of the Conditional Block is No, which means that if the password typed on the prompt page does not match, the report will display what is specified inside the No state of the block when the report is run.

Conditional block No

11) Display an error/incorrect password message in the No block by doing the following:

a) Drag and drop a Text Item from the Toolbox onto the page indicating that the password was incorrect.
b) Enter an error message to return to the user.

Incorrect password
12) With the Conditional Block still selected, do the following:

a) Go to Properties > Current Block
b) From the dropdown menu, select Yes.

Select Yes, current block

13) To set up the Yes response, do the following:

a) Select the data container that the report will show when running.
b) Drag and drop the data container into the Conditional Block.

Conditional Block
NOTES:

A) Security is not assured if other Report Studio users have read permission on the password protected report, as they would be able to view the password typed in the Conditional Explorer Expression Editor.
B) Multiple prompts can be employed on a Prompt Page to display multiple Conditional Blocks containing various Query results.