If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Dynamic chart - getting the children of a dimension

Started by Arvind, 23 May 2010 09:04:42 PM

Previous topic - Next topic

Arvind

Hello all,

I want to be able to dynamically select the series of a chart. Pl. see the attachment that I have come up with so far. This one correctly switches the dimension in the series. However I want to be able to display the children of the dimension. How do I do it? I tried several options with no success. Any help is greatly appreciated.

This sample is based on great_outdoors_8 cube.

Thanks in advance for your help.

ps: i am unable to upload the file. the code is below:
<report

xmlns="http://developer.cognos.com/schemas/report/6.

0/" expressionLocale="en-us">


<modelPath>/content/folder[@name='Samples']/package[

@name='great_outdoors_8']/model[@name='2010-05-18T10

:49:27.862Z']</modelPath>
<drillBehavior

modelBasedDrillThru="true"/>
<queries>
<query

name="Query1">


<source>


<model/>


</source>


<selection><dataItemMeasure

name="Revenue"><dmMember><MUN>[great_outdoors_8].[Me

asures].[Revenue]</MUN><itemCaption>Revenue</itemCap

tion></dmMember><dmDimension><DUN>[great_outdoors_8]

.[Measures]</DUN><itemCaption>Measures</itemCaption>

</dmDimension></dataItemMeasure><dataItemLevelSet

name="Year"><dmDimension><DUN>[great_outdoors_8].[Ye

ars]</DUN><itemCaption>Years</itemCaption></dmDimens

ion><dmHierarchy><HUN>[great_outdoors_8].[Years].[Ye

ars]</HUN><itemCaption>Years</itemCaption></dmHierar

chy><dmLevel><LUN>[great_outdoors_8].[Years].[Years]

.[Year]</LUN><itemCaption>Year</itemCaption></dmLeve

l></dataItemLevelSet><dataItemLevelSet name="Sales

regions"><dmDimension><DUN>[great_outdoors_8].[Sales

regions]</DUN><itemCaption>Sales

regions</itemCaption></dmDimension><dmHierarchy><HUN

>[great_outdoors_8].[Sales regions].[Sales

regions]</HUN><itemCaption>Sales

regions</itemCaption></dmHierarchy><dmLevel><LUN>[gr

eat_outdoors_8].[Sales regions].[Sales

regions].[Sales regions]</LUN><itemCaption>Sales

regions</itemCaption></dmLevel></dataItemLevelSet><d

ataItem name="Data

Item1"><expression>set(#promptmany('Parameter1','tok

en','[Sales regions1]')#)


</expression></dataItem><dataItemMember name="Sales

regions1"><dmMember><MUN>[great_outdoors_8].[Sales

regions].[Sales regions].[Sales

regions]-&gt;:[PC].[@MEMBER].[Sales region

code]</MUN><itemCaption>Sales

regions</itemCaption></dmMember><dmDimension><DUN>[g

reat_outdoors_8].[Sales

regions]</DUN><itemCaption>Sales

regions</itemCaption></dmDimension><dmHierarchy><HUN

>[great_outdoors_8].[Sales regions].[Sales

regions]</HUN><itemCaption>Sales

regions</itemCaption></dmHierarchy></dataItemMember>

<dataItemMember

name="Products"><dmMember><MUN>[great_outdoors_8].[P

roducts].[Products].[Products]-&gt;:[PC].[@MEMBER].[

Product line

code]</MUN><itemCaption>Products</itemCaption></dmMe

mber><dmDimension><DUN>[great_outdoors_8].[Products]

</DUN><itemCaption>Products</itemCaption></dmDimensi

on><dmHierarchy><HUN>[great_outdoors_8].[Products].[

Products]</HUN><itemCaption>Products</itemCaption></

dmHierarchy></dataItemMember></selection>
</query>
</queries>
<layouts>
<layout>


<reportPages>


<page

name="Page1"><style><defaultStyles><defaultStyle

refStyle="pg"/></defaultStyles></style>




<pageBody><style><defaultStyles><defaultStyle

refStyle="pb"/></defaultStyles></style>


<contents>


<selectValue

parameter="Parameter1"

autoSubmit="true"><selectOptions><selectOption

useValue="[Data Item2]"><displayValue>Sales

Regions</displayValue></selectOption><selectOption

useValue="[Products]"><displayValue>Products</displa

yValue></selectOption></selectOptions></selectValue>

<combinationChart depth="50" showTooltips="true"

maxHotspots="10000" refQuery="Query1"

name="Combination Chart1">


<legend>


<legendPosition>


<relativePosition/>


</legendPosition>


<legendTitle refQuery="Query1">


<style>


<defaultStyles>




<defaultStyle refStyle="lx"/>


</defaultStyles>


</style>


</legendTitle>


<style>


<defaultStyles>


<defaultStyle

refStyle="lg"/>


</defaultStyles>


</style>


</legend>


<ordinalAxis>


<axisTitle refQuery="Query1">


<style>


<defaultStyles>




<defaultStyle refStyle="at"/>


</defaultStyles>


</style>


</axisTitle>


<axisLine color="black"/>


<style>


<defaultStyles>


<defaultStyle

refStyle="al"/>


</defaultStyles>


</style>


</ordinalAxis>


<numericalAxisY1>


<axisTitle refQuery="Query1">


<style>


<defaultStyles>




<defaultStyle refStyle="at"/>


</defaultStyles>


</style>


</axisTitle>


<gridlines color="#cccccc"/>


<axisLine color="black"/>


<style>


<defaultStyles>


<defaultStyle

refStyle="al"/>


</defaultStyles>


</style>


</numericalAxisY1>


<combinationChartTypes>


<bar

valueType="stacked"><chartNodes><chartNode><chartNod

eMembers><chartNodeMember refDataItem="Data

Item1"><chartContents><chartTextItem><dataSource><me

mberCaption/></dataSource></chartTextItem></chartCon

tents></chartNodeMember></chartNodeMembers></chartNo

de></chartNodes></bar>


</combinationChartTypes>


<style>


<defaultStyles>


<defaultStyle

refStyle="ch"/>


</defaultStyles>


</style>


<commonClusters><chartNodes><chartNode><chartNodeMem

bers><chartNodeMember

refDataItem="Year"><chartContents><chartTextItem><da

taSource><memberCaption/></dataSource></chartTextIte

m></chartContents></chartNodeMember></chartNodeMembe

rs></chartNode></chartNodes></commonClusters><defaul

tChartMeasure

refDataItem="Revenue"/></combinationChart>


</contents>


</pageBody>


<pageHeader>


<contents>




<block><style><defaultStyles><defaultStyle

refStyle="ta"/></defaultStyles></style>


<contents>




<textItem><style><defaultStyles><defaultStyle

refStyle="tt"/></defaultStyles></style>




<dataSource>




<staticValue/>




</dataSource>


</textItem>


</contents>


</block>


</contents>


<style>


<defaultStyles>


<defaultStyle

refStyle="ph"/>


</defaultStyles>


<CSS

value="padding-bottom:10px"/>


</style>


</pageHeader>


<pageFooter>


<contents>


<table>


<tableRows>


<tableRow>




<tableCells>




<tableCell>




<contents>




<date>




<style>




<dataFormat>






<dateFormat/>




</dataFormat>




</style>




</date>




</contents>




<style>




<CSS

value="vertical-align:top;text-align:left;width:25%"

/>




</style>




</tableCell>




<tableCell>




<contents>




<pageNumber/>




</contents>




<style>




<CSS

value="vertical-align:top;text-align:center;width:50

%"/>




</style>




</tableCell>




<tableCell>




<contents>




<time>




<style>




<dataFormat>






<timeFormat/>




</dataFormat>




</style>




</time>




</contents>




<style>




<CSS

value="vertical-align:top;text-align:right;width:25%

"/>




</style>




</tableCell>




</tableCells>


</tableRow>


</tableRows>


<style>




<defaultStyles><defaultStyle

refStyle="tb"/></defaultStyles>


<CSS

value="border-collapse:collapse;width:100%"/>


</style>


</table>


</contents>


<style>


<defaultStyles>


<defaultStyle

refStyle="pf"/>


</defaultStyles>


<CSS

value="padding-top:10px"/>


</style>


</pageFooter>


</page>


</reportPages>
</layout>
</layouts>
<XMLAttributes><XMLAttribute

name="RS_CreateExtendedDataItems" value="true"

output="no"/><XMLAttribute name="listSeparator"

value="," output="no"/></XMLAttributes></report>