COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: cognoshelp@ymail.com on 29 Jul 2008 02:50:49 PM

Title: How can I use multiple queries in single chart report
Post by: cognoshelp@ymail.com on 29 Jul 2008 02:50:49 PM
Can any one tell how to use report studio multiple queries for single chart  i.e for series in chart

I need to use multiple series in chart and each series is getting from different query.

Title: Re: How can I use multiple queries in single chart report
Post by: m23 on 29 Jul 2008 09:45:08 PM
You can union these queries together into 1 query which you would then use for the chart. For the series column have the text different for each query and then you can use that column as the series and it should work.
Title: Re: How can I use multiple queries in single chart report
Post by: cognoshelp@ymail.com on 30 Jul 2008 09:03:20 AM
I have different columns in each query..

I have different filters for each query

eg: A in 1 query
    B in 2 query
    C in 3 query
but I need to use all these columns in single chart report
Title: Re: How can I use multiple queries in single chart report
Post by: m23 on 30 Jul 2008 08:30:13 PM
This is fine but you can only have 1 query to a chart. So you need to get all your data into 1 query. You can do this with a union. setup your queries so the columns are ordered so each query has x axis first then y axis then series. the series column can be a data item that you set your self ie '1' for series 1 '2' for series 2 etc. The names of the columns aren't important as cognos will just union the first columns together then the second then the third etc. Of course the data types of the columns must match. If you have 3 queries then you need 2 unions 1 for query 1 and 2. Then one for the the union of 1 and 2 and query 3.