COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: dougsarr on 24 Sep 2009 12:52:13 PM

Title: Crosstab x Calculations - Bug?
Post by: dougsarr on 24 Sep 2009 12:52:13 PM
Hi all,

I'm facing something that for seems like a ugly "bug" here than an error. But, let's what do you think about it.

I will briefly explain:
I have to build a disjointed crosstab to exhibit several metrics (around 50) by month. At layout point of view, is a very simple crosstab.
By the way, I have date for columns, and metrics for rows. Nothing new until here.

(http://farm3.static.flickr.com/2464/3950481373_72d734495c.jpg)

To build this crosstab, I have a single query that makes several calculations and many of those uses its results amoung each others. I map all dependencies, reaching in a maximum of 6 value for "Solve Order" Data Item property. To be more precise, I will put here an example of a calculation:

average (  if( [Mailing_Mtrc].[Ano mês] <= ?Safra? ) then ( [ARPU Rentb Med Mlg] / [ARPU Rentb Med GC] ) else ( null ) for report )

The first one depends from [ARPU Rentb Med Mlg] and [ARPU Rentb Med GC]; [ARPU Rentb Med Mlg] depends of [Rentb Total Mlg] / [Total Registros Mlg] calculation and so forth. Futhermore, test the query individualy and it runs fine. Aways.

When i connect it with the Crosstab, at this point my problem begin. Even I test or execute that report I got this message:

(http://farm3.static.flickr.com/2614/3950481437_f44f69028d.jpg)

RQP-DEF-0177: An error occurred while performing operation 'sqlPrepareWithOptions' status='-16'
UDA-SQL-0358 Line 149: Syntax error near ",".

Coincidently, there is no "," (virgule) in any part of my query nor in model. For functions, I'm using ";" (semicolon) instead.

If a use a list instead a crosstab, it runs fine. This is true also when I test query or made any charts that depends of it. So, i'm sure that my problem is not the Query.

This is taking too much time, and I have no idea what could be happening.

For completion, I can't check the Generated SQL because I got this error. It's tricky.


I hope you can help.

Thank you.
Title: Re: Crosstab x Calculations - Bug?
Post by: rockytopmark on 29 Sep 2009 10:32:40 AM
Assume this standard relational model?

Have you tried changing the else(NULL) to Else(0)?