You are on page 1of 16

Cognos Report Studio

Prompts and Subqueries

Creating a Prompt
In the Query Explorer, drag the field that will require a criteria prompt into the filter. Place ? around a statement that you want to appear when the user is prompted. Prompt page is not necessary unless you want to display the prompt options in a more user friendly fashion or add text to explain the prompt.

Creating a Prompt Page


Go to the page explorer. Drag a new page. Double click on the page and use the toolbox to drag text boxes and formatting items over to the page. Add text to explain the prompt.

Prompt Types
Decide on the type of prompt and drag it into your prompt page. Most often you will use one of these
Text box prompt Value prompt Date prompt Interval prompt

Within each prompt type there are options to fine tune the prompt for specific purposes. These options can be chosen in the properties pane to on the left of your screen.
Value prompts can be multi-select select so that users may enter more than one value. For example, a list of Medicaid IDs or a list of provider IDs.

Associating a Parameter
If you have already created a prompt in your query filter using ? you must link that parameter to the prompt you dragged into the prompt page.
When you drag the prompt into the page, a prompt wizard will pop up. or Select an associated prompt in the properties pane.

Passing Prompt Criteria


If you have several queries that will use the same prompt criteria, you can use one prompt to pass that data to each query. For example
Dates. Three queries pull different datasets but all data will need to be State Fiscal Year. List of client or provider identification numbers.

In the query filter, pull in the field that will require a prompt. Choose the parameters tab and drag the prompt parameter that you would like to pass

Subquery
Create a subquery in the same way you would pass a parameter.
First create a query which the second query will reference. Example, list of clients who are currently eligible for BCCP. Second create the main query pulling the data you need. Pull in the field that will reference the first query. Example client ID. In the filter options, click the queries tab. Find your first query and pull the correlating field. For example [HDR Client ID] in ([Entitlement Verification].[Client ID])

You might also like