Changing prompt values

After you set prompts for the first time in the IBM® Cognos® Viewer window and import the report into a Microsoft Office document, you can change prompt values when you refresh the reports or import additional report elements. The next time the report is refreshed, the new value is used to filter the data.

The prompt values in the following table require that you change or enter special text strings.
Table 1. Special prompt values
Prompt value Description Text string
Null or empty string ()

Null values represent missing data values for the report element. For example, a new eyewear product is introduced in 2010. Therefore, there are no sales in 2009. If the report author created a report that contains the years 2009 and 2010, the values for sales of the new eyewear for the year 2009 are null (missing).

Null values are displayed as blank cells in a crosstab or a list report.

<null>
No value

No value is selected from the list of available prompt values when the report is imported or refreshed.

<no_value>
Blank white space (' ')

Remains unchanged.

Blank white space (' ')

Tip: The No Data samples report in the GO Sales (query) package, GO Office Report Samples, is based on no data values for the prompts. For more information about The Sample Outdoors Company samples, see Sample reports and packages.

Procedure

  1. In the IBM Cognos pane, on the Manage Data tab, in the Properties pane, expand the Prompt list.

    The list of parameters is displayed. The parameters are displayed only if the report author designed the report by specifying that the prompt requires user input. In this case, you must select a prompt value before the report can be run successfully.

    If no list of parameters is displayed, the report author has specified prompt values to filter data. To expose these prompt values, you must open the report in Report Studio and build a Prompt Page by selecting the appropriate prompt controls.

  2. Expand each of the parameters.
    Prompt values are sorted by the prompt type in the following order: Specified Value, Cell Value, Always Prompt, and Custom Property.
  3. Choose how to define the prompt value for the report:
    • To define the value for a prompt, in the Type box, click Specified Value, and then, in the Use Value box, type the prompt answer, which is saved for future renditions of the Microsoft Office document.
    • To define the Excel cell reference for the prompt value, in the Type box, click Cell Value, and then, in the Cell Reference box, click the ellipsis (...) button, type the cell location, such as Sheet1!A7, and click OK. In the cell location that you specified, type the prompt value.
    • To prompt the user for a value whenever the report is refreshed, in the Type box, click Always Prompt.
    • To prompt the user for an initial value that is used for the same prompt in multiple reports in a document, or to define multiple values for all reports in a document, in the Type box, click Custom Property, and then, in the Custom Property box, type the name of the custom document property.

      If no name is provided, the program fails to retrieve the prompt value, and the Prompt window is displayed each time the report is refreshed.

      • In the Microsoft Office application, from the File menu, click Properties, and then click the Custom tab. In the Name box, select the name for the custom document property. The names in the list are derived from the Custom Property box Properties pane in IBM Cognos for Microsoft Office.
      • In the Type box, click the data type for the property that you want to add.
      • In the Value box, type the prompt answer based on the data source:
        • If the data source is dimensionally modeled relational data that does not contain a member unique name (MUN), type <prompt> or the prompt answer. The <prompt> string is used to open the prompt page where you can select a prompt value for the custom property prompt type.
        • If the data source is PowerCubes, copy the Member Unique Name (MUN) from the Use Value property box. The MUN contains the fully qualified path to where the member exists in the multidimensional structure.
        • If you want to assign multiple prompt values that are shared among all reports in a document, separate each value with a pipe character (|) to create a delimited list. The string length is limited to 255 characters. If the number and length of prompt values exceed this limit, use the Cell Value property to set the prompt values.

      Tip: You can use Microsoft Visual Basic for Applications (VBA) and a command-line interface to set the value of a custom document property. The API can be called within the Microsoft document using VBA to run through the list of prompt answers to get the results that you want.

Results

The values you enter are saved for future renditions of the Microsoft Office document. Users are prompted the first time the report is run or refreshed.

What to do next

In some cases, the Display Value for the prompt is not the same as the Use Value. To synchronize the values between the two prompt properties, see Synchronizing the Use Value and Display Value properties.