COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: krypto69 on 30 Apr 2013 11:03:07 AM

Title: Noob Question - Cognos Report Studio
Post by: krypto69 on 30 Apr 2013 11:03:07 AM
Hi,

I'm new to Cognos and have inherited a report that I need to change.

I have a report that has 5 queries in it, some of them joined and union-ed.

I need to add a field (company code) to an existing 'list' box.

I select the 'company code' field from the 'payroll history package' and attempt to add it to the end of the existing 'list box' but when I do - I get:

"You can only perform this insertion if the associated query is sourced from the package"

I've tried and tried to find a way to add this company code field into the query but don't know how..(or if that's the right way to go about this)..
Title: Re: Noob Question - Cognos Report Studio
Post by: Lynn on 30 Apr 2013 11:33:30 AM
Look at the list properties to see which query is sourcing the list. I suspect it will be a query that is the result of a join or union you mention. If that is the case, add your new column to the appropriate underlying query. Once you have it in the base queries you can then add it to the report query. Once it is there you can add it to the layout from the query tab of the insertable objects pane.

Hope this helps.
Title: Re: Noob Question - Cognos Report Studio
Post by: krypto69 on 01 May 2013 09:14:09 AM
Thank you SO much Lynn.

Your suggestion was just the help I  needed.
Title: Re: Noob Question - Cognos Report Studio
Post by: andrew127 on 22 Apr 2014 10:36:32 AM
Hello,

I am getting this same error message - "You can only perform this insertion if the associated query is sourced from the package"

There are queries and joins in the report I am working on, but I can't seem to complete what was suggested by Lynn. Could you possibly elaborate on how to "add your new column to the appropriate underlying query. Once you have it in the base queries you can then add it to the report query. Once it is there you can add it to the layout from the query tab of the insertable objects pane." as you described?

Thank you so much! I was just put into a Cognos report writing role with no training what so ever and it's proving quite difficult to learn!
Title: Re: Noob Question - Cognos Report Studio
Post by: Lynn on 22 Apr 2014 12:06:39 PM
Hi Andrew,
Training is really valuable so keep pressing for it if you can! The user guides are going to be your next best bet. You can scan through to get a feel for concepts and basic capabilities, then refer back later to get into details as needed.

If you want to add an item to a particular list or crosstab or chart, you need to figure out which query is "feeding" that layout. Do that as I described in my earlier post....by looking at the highest level object properties. Once you know that, look in the query explorer. It seems you already see multiple queries and joins going on, so you know what I'm talking about. Figure out which queries are joined (or perhaps union-ed) to create the query that your layout relies upon. You will need to add the desired data item from your source package to one or more of those underlying queries. Once the item exists in those, your join query will show it in the source pane so you can include it in the join query. Finally you can add it to the layout.

Good luck.