COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: M-girl on 11 Mar 2008 12:08:19 PM

Title: Report Issue: IF, THEN, ELSE expression
Post by: M-girl on 11 Mar 2008 12:08:19 PM
Hi, I hope someone can help me:

I am new to Report Studio and I can't identify where the issue with my report lies.  I created subsets of bar codes in 5 queries (Set1, Set2...).  This is the format I want to be able to report in:

                 Rev.Set1    Rev.Set2    Rev.Set3    Rev.Set4    Rev.Set5
Time Period       $               $              $              $               $

I used the IF, THEN, ELSE construct to select the revenue:
IF (Bar Code = Bar Code [Set1]), THEN ([Net Rev.]), ELSE (0).

My report will not run as a whole.  When I run the report with only one Set at a time, it is accurate.  When I try to display all 5, it will not run.

Any suggestions?
Title: Re: Report Issue: IF, THEN, ELSE expression
Post by: Suraj on 11 Mar 2008 01:32:59 PM
any error messages?
Title: Re: Report Issue: IF, THEN, ELSE expression
Post by: M-girl on 11 Mar 2008 01:45:23 PM
RQP-DEF-0177 An error occurred while performing operation 'sqlOpenResult' status='-28'. UDA-SQL-0114 The cursor supplied to the operation "sqlOpenResult" is inactive. UDA-SQL-0107 A general exception has occurred during the operation "open result". ORA-12801: error signaled in parallel query server P121 ORA-01652: unable to extend temp segment by 32 in tablespace TEMP

I don't know what it means and haven't been able to find anything in cognos support.
Title: Re: Report Issue: IF, THEN, ELSE expression
Post by: Suraj on 11 Mar 2008 01:54:52 PM
It should work. Could you post your logic?
If not, I'd suggest a union for your issue.
Create 5 queries each filtering for one set of value and then union them all together for a final query to report.
Title: Re: Report Issue: IF, THEN, ELSE expression
Post by: almeids on 11 Mar 2008 02:26:49 PM
That error is from Oracle, not Cognos - it means something's overflowing your database temporary work area, usually a sign of bad sql (cartesian product or something of the sort).
It does sound like you could be using a union - assuming your subsets are in separate sources - are they?  If not a single query should suffice.
Also, is this a crosstab or list?  From the calculation you described it sounds like you may be trying to do your own crosstabbing using a list, which is technically fine as long as your number of colums is fixed, but it may be easier to use a crosstab instead.
Title: Re: Report Issue: IF, THEN, ELSE expression
Post by: M-girl on 12 Mar 2008 12:25:20 PM
I created a union and it worked.
Thanks. 
Title: Re: Report Issue: IF, THEN, ELSE expression
Post by: Suraj on 12 Mar 2008 02:29:59 PM
Great :-)
Glad you got it working.