COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: zolex on 03 May 2007 03:08:45 AM

Title: query works with list but not with graph
Post by: zolex on 03 May 2007 03:08:45 AM
Hi,

In report studio, I have 3 queries:
query 1: year / month / amount (only for month 1) 
query 2: year / amount / (amount/12) 
query 3: join query 1 and 2, so we have amount/12 for every month. 
For example: amount = 12 --> jan = 1, feb = 1, ...
When I use a list on query 3, it works fine. But, when I use a graph on query 3, the field amount/12 is not accepted. When I use this field in the graph, and I validate the report, I get this error:
- <queryProblems> <message code="901"severity="error"title="QE-DEF-0459 CCLException"type="general">QE-DEF-0030 Ontleedfout uitdrukking.
QE-DEF-0359 De query bevat een verwijzing naar minstens één object '[Query_foto].[amount/12]' dat niet bestaat.
</message>
</queryProblems>

Does anybody know why this happens and how I have to do this?

Thanx.
Title: Re: query works with list but not with graph
Post by: larsonr on 03 May 2007 09:23:55 AM
I've actually seen this one a few times.  It was due to either A)modeling or B) the query.

Basically a graph is a visual representation of a crosstab.  If you're query can work in a cross tab it should work in a graph.

We had to go back and examine the queries that were being ran.  In our case we found that due to the model and the crazy filter we were applying we could use the calculation from the same fact table (only 1).  This meant I could not  pull data from two fact tables in the same query.  Under normal operations this was no problem but I was having to use Active Directory to create a filter that would grab the data pertinent to that user.

If your query is simple, have your Framework modeler go through and examine the joins and, if they exist, the determinants. 

Sorry this isn't very clear, I just know we've seen this error in our particular situation.
Title: Re: query works with list but not with graph
Post by: zolex on 04 May 2007 06:34:28 AM
Thank you Larsonr. Your response helped me to locate the problem: the calculated field. Instead of creating a calculated field in query 2, I created in query 3, and now it works!