Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

'Association' in Cognos8

Status
Not open for further replies.

Prasad678

Programmer
Dec 15, 2002
87
US
Lets say I have Pline, Ptype, Pname
I need to find total(measure1 for Pline), total(measure2 for Ptype)

I created a similar calculation but the summary doesn't seem to happen at Pline level/Ptype level.

What needs to be done?

Prasad
RPrasad1@Chn.Cognizant.com
 
For a list report, group on PLine, Ptype and so on. Select Revenue and click the Total summary from the toolbar. A calculation for each grouped level is automatically inserted.

Here's a sample using the Go Sales and Retailers package (part of the C8 samples) and C8 MR2 Report Studio:

<report xmlns=" expressionLocale="en-ca"><!--RS:8.1-->
<modelPath>/content/package[@name='GO Sales and Retailers']/model[@name='model']</modelPath>
<queries>
<query name="Query1">
<source>
<model/>
</source>
<selection><dataItem name="Product line" aggregate="none" rollupAggregate="total"><expression>[gosales_goretailers].[Products].[Product line]</expression></dataItem><dataItem name="Product type" aggregate="none" rollupAggregate="total"><expression>[gosales_goretailers].[Products].[Product type]</expression></dataItem><dataItem name="Product name" aggregate="none"><expression>[gosales_goretailers].[Products].[Product name]</expression></dataItem><dataItem name="Revenue" aggregate="total" rollupAggregate="total"><expression>[gosales_goretailers].[Orders].[Revenue]</expression></dataItem></selection>
</query>
</queries>
<layouts>
<layout>
<reportPages>
<page class="pg" name="Page1">
<pageBody class="pb">
<contents>
<list class="ls" refQuery="Query1">



<style>
<CSS value="border-collapse:collapse"/>
</style>
<listColumns><listColumn><listColumnTitle class="lt"><contents><textItem><dataSource><dataItemLabel refDataItem="Product line"/></dataSource></textItem></contents></listColumnTitle><listColumnBody class="lc"><contents><textItem><dataSource><dataItemValue refDataItem="Product line"/></dataSource></textItem></contents><listColumnRowSpan refDataItem="Product line"/></listColumnBody></listColumn><listColumn><listColumnTitle class="lt"><contents><textItem><dataSource><dataItemLabel refDataItem="Product type"/></dataSource></textItem></contents></listColumnTitle><listColumnBody class="lc"><contents><textItem><dataSource><dataItemValue refDataItem="Product type"/></dataSource></textItem></contents><listColumnRowSpan refDataItem="Product type"/></listColumnBody></listColumn><listColumn><listColumnTitle class="lt"><contents><textItem><dataSource><dataItemLabel refDataItem="Product name"/></dataSource></textItem></contents></listColumnTitle><listColumnBody class="lc"><contents><textItem><dataSource><dataItemValue refDataItem="Product name"/></dataSource></textItem></contents></listColumnBody></listColumn><listColumn><listColumnTitle class="lt"><contents><textItem><dataSource><dataItemLabel refDataItem="Revenue"/></dataSource></textItem></contents></listColumnTitle><listColumnBody class="lm"><contents><textItem><dataSource><dataItemValue refDataItem="Revenue"/></dataSource></textItem></contents></listColumnBody></listColumn></listColumns><listGroups><listGroup refDataItem="Product line"><listFooter><listRows><listRow><rowCells><rowCell colSpan="3" class="of"><contents><textItem><dataSource><dataItemValue refDataItem="Product line"/></dataSource></textItem></contents></rowCell><rowCell class="os"><contents><textItem><dataSource><dataItemValue refDataItem="Revenue"/></dataSource></textItem></contents></rowCell></rowCells></listRow></listRows></listFooter></listGroup><listGroup refDataItem="Product type"><listFooter><listRows><listRow><rowCells><rowCell colSpan="2" class="if"><contents><textItem><dataSource><dataItemValue refDataItem="Product type"/></dataSource></textItem></contents></rowCell><rowCell class="is"><contents><textItem><dataSource><dataItemValue refDataItem="Revenue"/></dataSource></textItem></contents></rowCell></rowCells></listRow></listRows></listFooter></listGroup></listGroups><sortList><sortItem refDataItem="Product name" sortOrder="ascending"/></sortList><listOverallGroup><listFooter><listRows><listRow><rowCells><rowCell colSpan="3" class="of"><contents><textItem><dataSource><staticValue>Summary</staticValue></dataSource></textItem></contents></rowCell><rowCell class="os"><contents><textItem><dataSource><dataItemValue refDataItem="Revenue"/></dataSource></textItem></contents></rowCell></rowCells></listRow></listRows></listFooter></listOverallGroup></list>
</contents>
</pageBody>
<pageHeader class="ph">
<contents>
<block class="ta">
<contents>
<textItem class="tt">
<dataSource>
<staticValue/>
</dataSource>
</textItem>
</contents>
</block>
</contents>
<style>
<CSS value="padding-bottom:10px"/>
</style>
</pageHeader>
<pageFooter class="pf">
<contents>
<table class="tb">
<tableRows>
<tableRow>
<tableCells>
<tableCell>
<contents>
<textItem>
<dataSource>
<reportExpression>AsOfDate()</reportExpression>
</dataSource>
</textItem>
</contents>
<style>
<CSS value="vertical-align:top;text-align:left;width:25%"/>
</style>
</tableCell>
<tableCell>
<contents>
<textItem>
<dataSource>
<staticValue>- </staticValue>
</dataSource>
</textItem>
<textItem>
<dataSource>
<reportExpression>PageNumber()</reportExpression>
</dataSource>
</textItem>
<textItem>
<dataSource>
<staticValue> -</staticValue>
</dataSource>
</textItem>
</contents>
<style>
<CSS value="vertical-align:top;text-align:center;width:50%"/>
</style>
</tableCell>
<tableCell>
<contents>
<textItem>
<dataSource>
<reportExpression>AsOfTime()</reportExpression>
</dataSource>
</textItem>
</contents>
<style>
<CSS value="vertical-align:top;text-align:right;width:25%"/>
</style>
</tableCell>
</tableCells>
</tableRow>
</tableRows>
<style>
<CSS value="border-collapse:collapse;width:100%"/>
</style>
</table>
</contents>
<style>
<CSS value="padding-top:10px"/>
</style>
</pageFooter>
</page>
</reportPages>
</layout>
</layouts>
</report>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top