If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Error CRX-API-0005 when creating variable

Started by qvixote, 07 May 2015 09:32:06 AM

Previous topic - Next topic

qvixote

Hello!

I have created a calculated measure names "NivelTerritorio" in a query named "Consulta1", with the following code:

ordinal(level(item([País];0)))

The measure shows an ordinal number representing the current level of "[País]", with 0 as the root level. Then I've created a string variable like:

[Consulta1].[NivelTerritorio]

And setted this as render variable, but when I run the report I get the following error message (it's in spanish, sorry):

La siguiente expresión no es válida: [Consulta1].[NivelTerritorio]. Si el elemento existe en una solicitud, pero no se hace referencia a él en el diseño, agréguelo a una lista de propiedades. CRX-API-0005 Se ha producido un error en o cerca de la posición ' 0'. La variable denominada ' [Consulta1].[NivelTerritorio]' no es válida.

The english translation of this message would be like: The next expression is invalid: [Consulta1].[NivelTerritorio]. If the element exist in the [prompt?], but it's not referenced in the layout, add it to a properties list. CRX-API-0005 An error has occurred near ' 0'. Variable ' [Consulta1].[NivelTerritorio]' is not valid.

There's no problem in the calculated measure. I've placed it in a list and verified that it works as I spected. What am I missing?

cognos810

Hello qvixote,
This error means that the object that you are trying to render/unrender using the data item [Consulta1].[NivelTerritorio], should contain this data item. For example, if you are trying to render/unrender a list object this data item should either be in the list or added to the properties of the list. If you select the list, within its properties on the left bottom side of report studio, you will see a property named "properties". That is where you would check the box next to this data item.

-Cognos810

qvixote

Hello again, Cognos810.

The problem is that the objects I'm trying to render/unrender are Text Elements. I've done this before, but with a variable based on prompt value. The text element don't have "properties" property.

cognos810

That is correct. A variable based on prompt value does not have a reference to any query data item, hence it does not have that constraint.
You can put this text element inside a singleton, which has the "properties" property.

-Cognos810

qvixote

A singleton, that did the trick! Putting the text elements in singletons, setting the query, the properties property and the render variable in the singleton itself.

Thank you a lot!