IBM Support

Mashup req field in the SelectValuePromptType is null

Technote (FAQ)


The LDX formatted prompt page returned for a report does not reflect the value set in Report Studio as per parameter="pWarehouse" refQuery="qWarehouses" required="false". When is the <req>false</req> element added to the LDX for a parameter?


The <req>false</req> is set in the LDX as an indication whether an entry is required to run the report. A variety of factors influence this requirement.
From the Report Studio tips:


Specifies whether the prompt is required or optional. If this property is set to required, the prompt must have a value entered before the report can be run. The Usage setting of the associated parameterized filter for this property will override the setting of this object. If you edit this property, but do not get the expected results, verify the Usage setting of the associated filter.

For example, if you created this prompt control with the prompt wizard and set the associated parameterized filter to be optional, changing the value of this property is not sufficient to change this setting. You must also edit the filter's Required property to match the setting for this object's Required property.

To edit a filter expression, you must select the filter, which is accessible from the Query view, using the Explorer bar.


The LDX output can be generated using the following:


The <req>false</req> element does not show up even after setting a parameter's Required field to No.

To verify, run the report from Report Studio and check for an asterisk indicating the entry is required to run the report.

Change the Usage property on the associated parameterized filter from Required to Optional, and the prompt page no longer shows the asterisk for that parameter.

The LDX output now has an <req>false</req> element.

To determine if a prompt has required="false" as per parameter="pWarehouse" refQuery="qWarehouses" required="false" use the SDK to extract and parse the report specification.

For more details regarding parsing through report specifications, see the section Using report specifications in the IBM Cognos Software Development Kit Developer Guide.

To see a sample:

<Cognos install location>\sdk\java\ReportSpec
When you run this sample, you will be prompted to select a column to add to a
report. This sample modifies a report specification using a Document Object
Model (DOM) parser. It retrieves the report specification from the IBM Cognos
Business Intelligence server, changes the specification using the DOM parser,
and then saves the modified report back to the server.

Additional information is provided below.

Related information

how to remove a document element from a Report specific
modify the modelConnection of a report specification
Report Specification Schema Reference
Dynamic ReportSpec Updater

Document information

More support for: Cognos Business Intelligence
Software Development Kit

Software version: 8.4.1, 10.1, 10.1.1, 10.2, 10.2.1

Operating system(s): AIX, HP-UX, Linux, Solaris, Windows

Reference #: 1653673

Modified date: 14 April 2014

Translate this page: