Alan Marsh
Alan Marsh

Reputation: 39

Cognos 11 Reports: I am using a date prompt in a filter and in data items but receive Error QE-DEF-0426

I have a date prompt in a filter:
[Fiscal Year - INFY] = substring(year(?Date?),3,2) but also use the prompt in a data item to determine how to calculate inventory amount: `CASE CAST(month(?Date?),INTEGER)

WHEN 1 THEN 0 WHEN 2 THEN [Jan]...etc`

This code worked when I did not use a prompt but used current_date instead. Any help would be much appreciated!

I received the following error code:

QE-DEF--0459 CCLException QE-DEF-0426 the function 'month' is not available in Function Set Id '_None'. Specify a Function Set Id on the appropriate data source in the model.

Upvotes: 0

Views: 141

Answers (1)

Daniel Wagemann
Daniel Wagemann

Reputation: 851

Your functions are missing the _ in front of them.

_month ( date_expression ) Returns the value of the month field in "date_expression".

_year ( date_expression ) Returns the value of the year field in "date_expression".

If you use the functions as they are in the function list you'll be better off when it comes to query processing and query decomposition.

Upvotes: 0

Related Questions