COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: vinch999 on 22 Mar 2011 04:23:26 AM

Title: chart series
Post by: vinch999 on 22 Mar 2011 04:23:26 AM
Hi all,

In my chart I have 2 series. The Data Items are the same
(In the prompt page I select 2 types (typeA and typeB) with a value prompt)

1) <#Type#> ===>I Want to display just TypeA (bar chart)
2) <#Type#> ===>I Want To display just TypeB (line chart)

I want to filter in the data expression
[data].[TYPE]

what is the correct syntaxe?
I tried :
[data].[TYPE]='TypeA' ==>Doesn't work

Title: Re: chart series
Post by: bvk.cognoise on 22 Mar 2011 06:03:44 AM
hi vinch i dont think this is correct process.but we can also achieve your requirement like this.
i will give a example

>create a blank report
>go to prompt page drag a value prompt into prompt page.
>just give prompt name then click finish.do not give package to use,use value ,display value.just give name finish it.
>select that prompt in properties add static choice
for eg give use value display value as followed
use value            display value
1                               BAR CHART
2                               lINE CHART
>then drag two conditional blocks into that blank page
>go to variable explorer then drag a String Variable and then give expression like

case
when ParamValue('Select chart type')= '1' then 'BAR'
when ParamValue('Select chart type')='2' then 'COLUMN'
end

>dont forget to change Param display value to param value
>then add values to that string variable like 'BAR'
>add another value like 'Column'

>open report page select one conditional block and assign string variable to that block
>then change current block property  to  'BAR'
>then select another block assign same string variable to that block
>but here change current block property to 'COLUMN'


>then add charts to two conditional blocks
>i dropped  BAR chart into first condition block
>i dropped  COLUMN chart into Second conditional block
>then add data items according to ur requirement.
>run the report

Hope it will work

thanks
vamsi
Title: Re: chart series
Post by: vinch999 on 22 Mar 2011 08:00:08 AM
Thank's for help  :) but it's not what i need to do (maybe I misspoke)
I need only 1 chart
Here is a picture to show you what i need to do
(http://img23.imageshack.us/img23/7494/grpho.th.png) (http://img23.imageshack.us/i/grpho.png/)
(http://img839.imageshack.us/img839/8015/grph2.th.png) (http://img839.imageshack.us/i/grph2.png/)
Title: Re: chart series
Post by: vinch999 on 24 Mar 2011 04:58:06 AM
no idea? :-[
Title: Re: chart series
Post by: PRIT AMRIT on 25 Mar 2011 05:14:41 AM
Hi,

As vamsi suggested, this is one of the ways to get your requirement done. Not necessarily you have to have 1 report so far it is meeting your requirement and end user is happy :D

Now, if still your issue is not resolved can you please explain more of whats happening?

Thanks
Title: Re: chart series
Post by: vinch999 on 25 Mar 2011 07:40:38 AM
Finally, I proceeded by other ways !
no problems( for the moment  ;D)