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

Variable not working

Started by dfite, 11 Mar 2008 04:19:01 PM

Previous topic - Next topic

dfite

OK, this is a strange one.  When I try to create a variable whose expression [TIER1_IND] = 1 points to a query item in my Main_Query I get an "Invalid Expression", but I can create a variable with a similar expression that points to a query item in another query just fine!  What gives??  Anyone run in to this before?

almeids

For a variable expression that straightforward, the only time I've seen validation errors is when the data types don't match.  Are you sure [TIER1_IND] is numeric?

dfite

Thanks for the quick reply!  Well, the data item in framework mgr is a float64.  I'm not sure how cognos decides what data type to assign to things, but it won't let me change it.  But, I've also tried = '1', is null, = null, is not null, > 0, you name it, I've tried it. Also, ALL other query items from that query fail to validate as well, whereas all other query items from other queries work just fine!!  So, its somehting to do with that query...

The other weird thing is that in the expression builder window, when I click on any data item from the main_query cognos inserts the query name, whereas it doens't do that for query items from other queries.  Not sure if that has something to do with it.  It inserts: [main_query].[tier1_ind] when I click on that query item from the main_query query.  But when I click on , say, fross_amt from grosspay_query, it just inserts [gross_amt].  I don't know where to look to see what Cognos thinks is so different betwen these queries!

almeids

Hmmm, sounds pretty numeric.  That is quite bizarre.  I've never seen the query name included in a variable expression.  In fact, I was going to suggest that you delete the expression contents and recreate by dragging from your query in case you had a same-named item in another query, but you seem to have done that already!
How about deleting and recreating the variable entirely, does that have any effect?  Or recreating the data item?  The query?


almeids

A few more questions...
What is the structure of main_query?  Any child tabular models, tabular sets, tabular references, anything unusual? 
How about the structure in FM - anything different about that query's  source relative to the others'?  Is it in the same namespace as the others?


dfite

no nothing unusual as far as I could see.  I even went into FM and created a new query subject and went into the report, dropped the query and made a new one with the items from the new query subject.  When I did that, I created a new variable and double clicked on the query1.tier1_ind item and at least it just put [tier1_ind] into the expression but it still fails validation (while any other item from another query doesn't fail validation...)

I'm stumped.

almeids

Sorry, dfite, but I'm afraid I'm stumped too.  Though frequently a long shot you might try opening a case with Cognos if you're supported (of course you'll have to reproduce the problem with Great Outdoors!).  If you do find the cause/solution please post it, this is very intriguing.


Ty Clabbers

Just te be sure, if you create a query where you only select the tier1_and item you don't get an error? If so, can you post the query report studio creates here? Can you also try to run the query directly on your database (of course using the same user that Cognos uses to connect). Do you get a bigger error message or only the "invalid expression" phrase?