COGNOiSe.com - The IBM Cognos Community

Legacy Business Intelligence => COGNOS ReportNet => Topic started by: vsudaya on 23 Nov 2005 05:51:38 AM

Title: Using Conditional Sytle-problem
Post by: vsudaya on 23 Nov 2005 05:51:38 AM
HI,

I have a report with 2 queries(refer to one query subject), one query(1) contains main report columns, and another query(2) contains the columns of which will check whether main report columns has got values(it has got values 0 and 1 from table) or not.  I am creating 5 vaiables for conditional style by referencing the query 2 columns, i am checking like this. i am using this  variables in conditional style. whenever, i do like this, i am getting invalid expression RSV-RND-0051. 

if query2.col_2 = 0 then 'h'
else 'n'

So, i have removed query2 and placed all columns in query1, and created variables by referencing query1.

my doubt is can't i use variables referencing to query2 in my main report(query1) columns for conditional style?


thanks in adavnce
vsub
Title: Re: Using Conditional Sytle-problem
Post by: mikegreen on 23 Nov 2005 10:48:51 AM
Quote from: vsud link=t opic=715.msg3102#msg3102 date=1132746698
HI,

I have a report with 2 queries(refer to one query subject), one query(1) contains main report columns, and another query(2) contains the columns of which will check whether main report columns has got values(it has got values 0 and 1 from table) or not.  I am creating 5 vaiables for conditional style by referencing the query 2 columns, i am checking like this. i am using this  variables in conditional style. whenever, i do like this, i am getting invalid expression RSV-RND-0051. 

if query2.col_2 = 0 then 'h'
else 'n'

So, i have removed query2 and placed all columns in query1, and created variables by referencing query1.

my doubt is can't i use variables referencing to query2 in my main report(query1) columns for conditional style?


thanks in adavnce
vsub

You might try to combine the two tabular data sets into one query.. Then you can use just like they were one datasource/query/etc.

Maybe it isnt that simple, but thats the first thing I'd try.

Regards,

Mike
Title: Re: Using Conditional Sytle-problem
Post by: vsudaya on 24 Nov 2005 12:01:03 AM
Hi,

How can u combine two tabular data sets into one query, we can have two tabular models in one tabular set.
can u explain this?

thanks in advance
vsud
Title: Re: Using Conditional Sytle-problem
Post by: raro on 02 Dec 2005 03:01:44 PM
Quote from: vsud on 24 Nov 2005 12:01:03 AM
How can u combine two tabular data sets into one query, we can have two tabular models in one tabular set.
can u explain this?

in CRN you can almost do "unions" undefinit (max 192 queries  ;) )

the query tree then looks something like this:

--- tab_mod_master
      |
      |- tab_set
                |
                | --- tab_mod
                | --- tab_set
                            |
                            |--- tab_mod
                            |--- tab_mod


This way the tab_mod_master may contain data from three different
queries and/or may change/filter ... the data coming from
those 3 queries.

hope this helps.