IBM Support

A conditional variable based on a query item that is not displayed within the current container causes CRX-API-0005

Troubleshooting


Problem

An error occurs when there is a conditional variable based on a query item that is not displayed within the current container on the report layout. This is due to new functionality in IBM Cognos that optimises the query to eliminate unused data items from the resulting query SQL or MDX. To include a query item on the layout without displaying the object requires that the query item be added to the properties of the container in the layout.

Symptom

CRX-API-0005 An error on or around the position '0'. The variable named '[QueryX].[XXXX]' is invalid.

Resolving The Problem

Select the query item being used for the evaluation of the conditional variable in the report, under properties of the report object. For example, for a list object, click the ellipses next to "Properties" in the Data section of the List object properties.

Note: For other report types such as chart and crosstab, the data item must appear in the layout.

Steps:

  1. Select the report object that has the conditional variable being used for formatting or anything other object that report user may be using with the conditional variable.
  2. Use the control above the properties pane to navigate the ancestor objects from the layout. For a list report, select the List object. For a crosstab report, select the Crosstab Node Member.
  3. Locate the Data section in the Properties pane for the List or Crosstab Node Member object.
  4. Within the Data section, click on the elipses "..." next to the Properties entry.
  5. Select the query item that is being used in the conditional variable expression.
  6. Click OK to return to your report layout. The data item should now be available within the scope of your List or Crosstab Node when the report is executed.

If the error still appears when a data item is being used directly on the page without a query container such as a list or crosstab then similar steps can be taken to set the available query items at the Page level...
  1. Select the Page object from the ancestor control after selecting any object in the page layout.
  2. Set the Query property of the Page object to reference the query containing the required data item.
  3. The list of available query items can now be set for the Page using the Properties entry in the Data section of the Page object properties.

[{"Product":{"code":"SSEP7J","label":"Cognos Business Intelligence"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Report Studio","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"10.2.2;10.2.1;10.2;10.1.1;10.1","Edition":"All Editions","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Historical Number

1018453

Document Information

Modified date:
15 June 2018

UID

swg21339433