To use IBM Cognos product documentation, you must enable JavaScript in your browser.

Edit Existing Prompts in IBM Cognos 8 Reports and Packages

You can use an IBM Cognos 8 report created in Query Studio or Report Studio, or an IBM Cognos 8 package as a data source for a model . These data sources may contain prompts that add interactivity for users. Prompts are questions that help users customize the information to suit their own needs. For example, a prompt may let users select a product type. Only products belonging to the selected product type are retrieved and shown in the report.

Prompts are either mandatory or optional; mandatory prompts require values before Transformer can execute queries. For optional prompts in IBM Cognos 8 report or package data sources, Transformer does not require that you provide values.

When using a report with prompts as a data source, the user interface presented by Transformer for prompts may be different than the user interface presented when running the report in the IBM Cognos studio. For example, a report with a prompt page defined to contain a single-value select drop-down list may be presented in Transformer as a multi-value select list. This behavior occurs because Transformer does not process any information from report prompt pages. Ensure that you understand the purpose of each prompt when using a report as a data source.

Many types of prompts exist, such as a text box prompt where you type a single value, and a value prompt where you select a value from a list. The prompt type determines the number of values you must provide, and the user interface shown for entering those values. For example, for a single-value prompt, Transformer uses the value when executing the query. For prompts with more than one value, Transformer lets you define multiple values. These values are presented in a drop-down list from which you can select more than one value when Transformer executes the query. Note that although default values for multi-valued prompts are supported in Transformer when using a report as a data source, the default values do not appear. However, if you do not provide any values for the prompt, the default values are used.

Report or package authors determine whether prompts are mandatory or optional. You cannot change this designation within Transformer, or create prompts using Transformer.

To create two queries in your Transformer model that are based on the same report data source, where you want to provide different values for mandatory prompts, you must duplicate the report data source. Use one report data source to add the first query to the model, and use the duplicate report data source to add the second query to the model.

Transformer may reflect a cascade prompt as two multi- or single-select prompts:

For query results in Transformer, only the second level is relevant. You should be aware that the first prompt may appear as a multi-select prompt in Transformer, even though the prompt in Report Studio is a drop-down list box; in this situation, Transformer will ignore the first prompt.

When using a report that includes prompts as a data source, some types of prompts produce supporting queries. Although these queries can be selected in Transformer, error messages will occur if you select them. You can ignore the messages.

Steps
  1. Right-click a query in the model and click Edit Prompts.

    If the query does not contain any prompts, Transformer displays a message indicating that no prompts were found.

  2. For each prompt that you want to specify values for, in the Query Prompts dialog box, click the Value box for the prompt that you want to define.

  3. Define the variable or value for the prompt:

    Tips:

  4. For each prompt that you want to delete from the query, in the Query Prompts dialog box, click the row in which the prompt appears and click Remove.

  5. Click OK.

Generate a File of Prompt Values for Use in the Command Line

You can generate an XML command file that includes prompt values for one or more queries. This file is necessary to provide prompt values in UNIX environments. For more information about command line options and this command file, see Command Line Options.

For each query that requires prompt values, ensure that your selections are up-to-date with the underlying package or report.

Steps
  1. Right-click a prompt and click Create Prompt Specification to create a command line file for one query or click Create Prompt Specifications For All Queries to create a command line file for all queries.

  2. Choose a folder for the command line file, type a name for the command line file, and click Save to save the command line file to your computer.

Remove Obsolete Prompts

Transformer stores prompts and their values in the Transformer model and uses this information for data requests and to generate a prompt specification. A prompt specification is supplied at the command line in batch mode to override the values stored in the model.

Prompts that are no longer in a package or report are identified as obsolete. This will occur, for example, if you remove a prompt for the report on which the model is based and save the report. Then, when you use the Edit Prompts command, that prompt is identified as obsolete in the Query Prompts dialog box. A prompt may also be identified as obsolete simply because the underlying report or package is unavailable. Once the report or package becomes available, the prompt becomes up-to-date again. Tip: If all or several prompts are marked obsolete, verify the connection to the server.

To ensure that your prompt selections are up-to-date with the underlying package or report, for each data source in the model, you must remove any obsolete prompts.

Steps
  1. In the Data Sources window, right-click the query and click Edit Prompts.

  2. In the Query Prompts dialog box, in the Name list, click any obsolete prompts.

    Tip: Obsolete prompts are indicated by an icon.

  3. Click Remove.

    You must repeat these steps for each query.

Note: Alternatively, you can remove obsolete prompts by directly editing the prompt specification file that is generated from the model.