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

[Solved]How to display two graphs in a single graph

Started by mrcool, 28 Nov 2005 11:27:23 PM

Previous topic - Next topic

mrcool

Hi frnds,

Herewith I have attached a sample graph which I need to create a column graph in reportnet report studio.PleaseÃ,  suggest me.

Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  In the attached graph the line displays the target values and the bar displays the actual values for the same x-axis and y-axis.


thanks,
S

pmcghiey

You would want to insert a combination type chart which allows you to have multiple type charts in one chart.Ã,  Here is some code (screen shot attached) for a simple combination chart of Revenue Vs. Planned Revenue for the GoSales package:

<report xml:lang="en-us" xmlns="http://developer.cognos.com/schemas/report/1/"><!--RS:1.1-->
<modelConnection name="/content/package[@name='GO Sales and Retailers']/model[@name='model']"/>
<querySet xml:lang="en-us">
<BIQuery name="Query1">
<cube><factList><item refItem="Revenue" aggregate="none" isHeader="true"/><item refItem="Planned revenue" aggregate="none" isHeader="true"/></factList><dimension name="Order year"><level name="Order year"><item refItem="Order year" aggregate="none" key="true" isHeader="true"/></level></dimension></cube>
<tabularModel><dataItem name="Revenue" aggregate="total"><expression>[gosales_goretailers].[Orders].[Revenue]</expression></dataItem><dataItem name="Planned revenue" aggregate="total"><expression>[gosales_goretailers].[Orders].[Planned revenue]</expression></dataItem><dataItem name="Order year" aggregate="none"><expression>[gosales_goretailers].[Orders].[Order year]</expression></dataItem></tabularModel></BIQuery>

<BIQuery name="Query1_chart"><cubeReference refQuery="Query1"/><summary><dataCells><item refItem="Revenue"/><item refItem="Planned revenue"/></dataCells><columnEdge><level refLevel="Order year"><item refItem="Order year"/></level></columnEdge><rowEdge><cellMembers/></rowEdge></summary></BIQuery></querySet>
<layoutList>
<layout>

<pageSet>

<page name="Page1">
<pageBody>
<chart refQuery="Query1_chart">
<chartBody/>
<title render="false">
<text/>
</title>
<subtitle render="false">
<text/>
</subtitle>
<footer render="false">
<text/>
</footer>
<legend>
<itemTruncationText>
<text/>
</itemTruncationText>
</legend>
<axis axisPosition="X">
<labels/>
</axis>
<categoryItemTruncationText>
<text/>
</categoryItemTruncationText>
<axis axisPosition="Y1">
<labels/>
</axis>
<combinationChart depth="0" standardType="standard"><column><chartMember refMember="Revenue"/></column><line><chartMember refMember="Planned revenue"/></line></combinationChart>
<chartMeasure><chartText><queryItemRef refItem="Revenue" content="label"/></chartText><member refMember="Revenue"/></chartMeasure><chartMeasure><chartText><queryItemRef refItem="Planned revenue" content="label"/></chartText><member refMember="Planned revenue"/></chartMeasure><chartLevel refLevel="Order year"><queryItemRef refItem="Order year"/><chartText><queryItemRef refItem="Order year" content="label"/></chartText></chartLevel></chart>
</pageBody>
<pageHeader>
<block class="reportTitle">
<textItem class="reportTitleText">
<text/>
</textItem>
</block>
<style>
<CSS value="padding-bottom:10px"/>
</style>
</pageHeader>
<pageFooter>
<table>
<tableRow>
<tableCell>
<textItem>
<expression>AsOfDate()</expression>
</textItem>
<style>
<CSS value="vertical-align:top;text-align:left;width:25%"/>
</style>
</tableCell>
<tableCell>
<textItem>
<text>- </text>
</textItem>
<textItem>
<expression>PageNumber()</expression>
</textItem>
<textItem>
<text> -</text>
</textItem>
<style>
<CSS value="vertical-align:top;text-align:center;width:50%"/>
</style>
</tableCell>
<tableCell>
<textItem>
<expression>AsOfTime()</expression>
</textItem>
<style>
<CSS value="vertical-align:top;text-align:right;width:25%"/>
</style>
</tableCell>
</tableRow>
<style>
<CSS value="border-collapse:collapse;width:100%"/>
</style>
</table>
<style>
<CSS value="padding-top:10px"/>
</style>
</pageFooter>
</page></pageSet></layout>
</layoutList>
</report>

kalyan_sekhar1

Hi,

Is that possible to plot the same thing in the Pie chart ?

Thanks

mrcool

HI,

        thanks for ur reply...as kalyan asked is there any sol for pie chart?



Thanks,
S

mrcool

Hi,

     Thanks for ur reply and it worked fine for column chart.As kalyan asked is there any sol for pie chart?



Thanks,
S

pmcghiey

The combination chart does not work with pie charts.Ã,  Not sure what you are trying to do because a pie chart doesn't seem to fit with any other type of chart (i.e. line, bar, etc.).Ã,  If you are talking about multiple pie charts then the pie chart graph can already handle that.Ã,  If you are want to have a pie chart and another type of graph on the report, you would just put multiple chart objects on the report.

mrcool