Information repeating on subsequent pages - cognos

Using IBM Cognos Analytics 11.1.7IF8
I am developing a report that should have multiple lists of information on the report page, separated by category headers. The problem is that "page" will likely span multiple, physical pages on a printed document. The header for group one shows on every page. (I suspect that subsequent groups -- like 2 of 3 -- would also appear inappropriately on later pages.)
The lists in my report are not the same, so I can't have a single list with a group (which would, otherwise, solve this problem). I have developed this using blocks to layout the page.
How can I keep stuff from repeating where it should not?
I have developed a report using the samples to demonstrate the problem and provide starting code for anyone who may work on this. This is a very simple example. When using this, please realize that the queries in my actual report are not compatible. They can't be mashed into a single query.
StackOverflow requires me to post the code here, so...
<report xmlns="http://developer.cognos.com/schemas/report/15.5/" useStyleVersion="11.6" expressionLocale="en-us">
<drillBehavior/>
<layouts>
<layout>
<reportPages>
<page name="Page1">
<style>
<defaultStyles>
<defaultStyle refStyle="pg"/>
</defaultStyles>
</style>
<pageBody>
<style>
<defaultStyles>
<defaultStyle refStyle="pb"/>
</defaultStyles>
</style>
<contents>
<block>
<contents>
<textItem>
<dataSource>
<staticValue>West</staticValue>
</dataSource>
</textItem>
</contents>
<style>
<CSS value="font-size:12pt;font-weight:bold;padding-top:2em"/>
</style>
</block>
<block>
<contents>
<list horizontalPagination="true" refQuery="West" name="List2">
<noDataHandler>
<contents>
<block>
<contents>
<textItem>
<dataSource>
<staticValue>No Data Available</staticValue>
</dataSource>
</textItem>
</contents>
<style>
<CSS value="padding:16px;"/>
</style>
</block>
</contents>
</noDataHandler>
<style>
<CSS value="border-collapse:collapse"/>
<defaultStyles>
<defaultStyle refStyle="ls"/>
</defaultStyles>
</style>
<listColumns>
<listColumn>
<listColumnTitle>
<style>
<defaultStyles>
<defaultStyle refStyle="lt"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemLabel refDataItem="Country"/>
</dataSource>
</textItem>
</contents>
</listColumnTitle>
<listColumnBody>
<style>
<defaultStyles>
<defaultStyle refStyle="lc"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemValue refDataItem="Country"/>
</dataSource>
</textItem>
</contents>
</listColumnBody>
</listColumn>
<listColumn>
<listColumnTitle>
<style>
<defaultStyles>
<defaultStyle refStyle="lt"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemLabel refDataItem="Province or state"/>
</dataSource>
</textItem>
</contents>
</listColumnTitle>
<listColumnBody>
<style>
<defaultStyles>
<defaultStyle refStyle="lc"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemValue refDataItem="Province or state"/>
</dataSource>
</textItem>
</contents>
</listColumnBody>
</listColumn>
<listColumn>
<listColumnTitle>
<style>
<defaultStyles>
<defaultStyle refStyle="lt"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemLabel refDataItem="Last name"/>
</dataSource>
</textItem>
</contents>
</listColumnTitle>
<listColumnBody>
<style>
<defaultStyles>
<defaultStyle refStyle="lc"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemValue refDataItem="Last name"/>
</dataSource>
</textItem>
</contents>
</listColumnBody>
</listColumn>
<listColumn>
<listColumnTitle>
<style>
<defaultStyles>
<defaultStyle refStyle="lt"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemLabel refDataItem="First name"/>
</dataSource>
</textItem>
</contents>
</listColumnTitle>
<listColumnBody>
<style>
<defaultStyles>
<defaultStyle refStyle="lc"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemValue refDataItem="First name"/>
</dataSource>
</textItem>
</contents>
</listColumnBody>
</listColumn>
<listColumn>
<listColumnTitle>
<style>
<defaultStyles>
<defaultStyle refStyle="lt"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemLabel refDataItem="Quantity"/>
</dataSource>
</textItem>
</contents>
</listColumnTitle>
<listColumnBody>
<style>
<defaultStyles>
<defaultStyle refStyle="lm"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemValue refDataItem="Quantity"/>
</dataSource>
</textItem>
</contents>
</listColumnBody>
</listColumn>
<listColumn>
<listColumnTitle>
<style>
<defaultStyles>
<defaultStyle refStyle="lt"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemLabel refDataItem="Revenue"/>
</dataSource>
</textItem>
</contents>
</listColumnTitle>
<listColumnBody>
<style>
<defaultStyles>
<defaultStyle refStyle="lm"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemValue refDataItem="Revenue"/>
</dataSource>
</textItem>
</contents>
</listColumnBody>
</listColumn>
</listColumns>
<sortList>
<sortItem refDataItem="Country"/>
<sortItem refDataItem="Province or state"/>
<sortItem refDataItem="Last name"/>
<sortItem refDataItem="First name"/>
</sortList>
</list>
</contents>
</block>
<block>
<contents>
<textItem>
<dataSource>
<staticValue>East</staticValue>
</dataSource>
</textItem>
</contents>
<style>
<CSS value="font-size:12pt;font-weight:bold;padding-top:2em"/>
</style>
</block>
<block>
<contents>
<list horizontalPagination="true" refQuery="East" name="List1">
<noDataHandler>
<contents>
<block>
<contents>
<textItem>
<dataSource>
<staticValue>No Data Available</staticValue>
</dataSource>
</textItem>
</contents>
<style>
<CSS value="padding:16px;"/>
</style>
</block>
</contents>
</noDataHandler>
<style>
<CSS value="border-collapse:collapse"/>
<defaultStyles>
<defaultStyle refStyle="ls"/>
</defaultStyles>
</style>
<listColumns>
<listColumn>
<listColumnTitle>
<style>
<defaultStyles>
<defaultStyle refStyle="lt"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemLabel refDataItem="Country"/>
</dataSource>
</textItem>
</contents>
</listColumnTitle>
<listColumnBody>
<style>
<defaultStyles>
<defaultStyle refStyle="lc"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemValue refDataItem="Country"/>
</dataSource>
</textItem>
</contents>
</listColumnBody>
</listColumn>
<listColumn>
<listColumnTitle>
<style>
<defaultStyles>
<defaultStyle refStyle="lt"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemLabel refDataItem="Province or state"/>
</dataSource>
</textItem>
</contents>
</listColumnTitle>
<listColumnBody>
<style>
<defaultStyles>
<defaultStyle refStyle="lc"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemValue refDataItem="Province or state"/>
</dataSource>
</textItem>
</contents>
</listColumnBody>
</listColumn>
<listColumn>
<listColumnTitle>
<style>
<defaultStyles>
<defaultStyle refStyle="lt"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemLabel refDataItem="Last name"/>
</dataSource>
</textItem>
</contents>
</listColumnTitle>
<listColumnBody>
<style>
<defaultStyles>
<defaultStyle refStyle="lc"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemValue refDataItem="Last name"/>
</dataSource>
</textItem>
</contents>
</listColumnBody>
</listColumn>
<listColumn>
<listColumnTitle>
<style>
<defaultStyles>
<defaultStyle refStyle="lt"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemLabel refDataItem="First name"/>
</dataSource>
</textItem>
</contents>
</listColumnTitle>
<listColumnBody>
<style>
<defaultStyles>
<defaultStyle refStyle="lc"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemValue refDataItem="First name"/>
</dataSource>
</textItem>
</contents>
</listColumnBody>
</listColumn>
<listColumn>
<listColumnTitle>
<style>
<defaultStyles>
<defaultStyle refStyle="lt"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemLabel refDataItem="Quantity"/>
</dataSource>
</textItem>
</contents>
</listColumnTitle>
<listColumnBody>
<style>
<defaultStyles>
<defaultStyle refStyle="lm"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemValue refDataItem="Quantity"/>
</dataSource>
</textItem>
</contents>
</listColumnBody>
</listColumn>
<listColumn>
<listColumnTitle>
<style>
<defaultStyles>
<defaultStyle refStyle="lt"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemLabel refDataItem="Revenue"/>
</dataSource>
</textItem>
</contents>
</listColumnTitle>
<listColumnBody>
<style>
<defaultStyles>
<defaultStyle refStyle="lm"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemValue refDataItem="Revenue"/>
</dataSource>
</textItem>
</contents>
</listColumnBody>
</listColumn>
</listColumns>
<sortList>
<sortItem refDataItem="Country"/>
<sortItem refDataItem="Province or state"/>
<sortItem refDataItem="Last name"/>
<sortItem refDataItem="First name"/>
</sortList>
</list>
</contents>
</block>
</contents>
</pageBody>
<XMLAttributes>
<XMLAttribute output="no" name="RS_legacyDrillDown" value="0"/>
</XMLAttributes>
</page>
</reportPages>
<pageSetup>
<namedPaper name="/configuration/pageDefinition[#name=&apos;Letter&apos;]"/>
</pageSetup>
</layout>
</layouts>
<XMLAttributes>
<XMLAttribute output="no" name="RS_CreateExtendedDataItems" value="true"/>
<XMLAttribute output="no" name="listSeparator" value=","/>
<XMLAttribute output="no" name="decimalSeparator" value="."/>
<XMLAttribute output="no" name="RS_modelModificationTime" value="2015-11-25T21:38:24.820Z"/>
</XMLAttributes>
<queries>
<query name="East">
<source>
<model/>
</source>
<selection>
<dataItem aggregate="none" rollupAggregate="none" name="Country">
<expression>[Sales (query)].[Branch].[Country]</expression>
<XMLAttributes>
<XMLAttribute output="no" name="RS_dataType" value="3"/>
<XMLAttribute output="no" name="RS_dataUsage" value="0"/>
</XMLAttributes>
</dataItem>
<dataItem aggregate="none" rollupAggregate="none" name="Province or state">
<expression>[Sales (query)].[Branch].[Province or state]</expression>
<XMLAttributes>
<XMLAttribute output="no" name="RS_dataType" value="3"/>
<XMLAttribute output="no" name="RS_dataUsage" value="0"/>
</XMLAttributes>
</dataItem>
<dataItem aggregate="none" rollupAggregate="none" name="Last name">
<expression>[Sales (query)].[Sales staff].[Last name]</expression>
<XMLAttributes>
<XMLAttribute output="no" name="RS_dataType" value="3"/>
<XMLAttribute output="no" name="RS_dataUsage" value="0"/>
</XMLAttributes>
</dataItem>
<dataItem aggregate="none" rollupAggregate="none" name="First name">
<expression>[Sales (query)].[Sales staff].[First name]</expression>
<XMLAttributes>
<XMLAttribute output="no" name="RS_dataType" value="3"/>
<XMLAttribute output="no" name="RS_dataUsage" value="0"/>
</XMLAttributes>
</dataItem>
<dataItem aggregate="total" name="Quantity">
<expression>[Sales (query)].[Sales].[Quantity]</expression>
<XMLAttributes>
<XMLAttribute output="no" name="RS_dataType" value="1"/>
<XMLAttribute output="no" name="RS_dataUsage" value="2"/>
</XMLAttributes>
</dataItem>
<dataItem aggregate="total" name="Revenue">
<expression>[Sales (query)].[Sales].[Revenue]</expression>
<XMLAttributes>
<XMLAttribute output="no" name="RS_dataType" value="2"/>
<XMLAttribute output="no" name="RS_dataUsage" value="2"/>
</XMLAttributes>
</dataItem>
</selection>
<detailFilters>
<detailFilter>
<filterExpression>[Sales (query)].[Branch].[Country] in (&apos;Australia&apos;, &apos;Austria&apos;, &apos;Belgium&apos;, &apos;China&apos;, &apos;Denmark&apos;, &apos;Finland&apos;, &apos;France&apos;, &apos;Germany&apos;, &apos;Italy&apos;, &apos;Japan&apos;, &apos;Korea&apos;, &apos;Netherlands&apos;, &apos;Singapore&apos;, &apos;Spain&apos;, &apos;Sweden&apos;, &apos;Switzerland&apos;, &apos;United Kingdom&apos;)</filterExpression>
</detailFilter>
</detailFilters>
</query>
<query name="West">
<source>
<model/>
</source>
<selection>
<dataItem aggregate="none" rollupAggregate="none" name="Country">
<expression>[Sales (query)].[Branch].[Country]</expression>
<XMLAttributes>
<XMLAttribute output="no" name="RS_dataType" value="3"/>
<XMLAttribute output="no" name="RS_dataUsage" value="0"/>
</XMLAttributes>
</dataItem>
<dataItem aggregate="none" rollupAggregate="none" name="Province or state">
<expression>[Sales (query)].[Branch].[Province or state]</expression>
<XMLAttributes>
<XMLAttribute output="no" name="RS_dataType" value="3"/>
<XMLAttribute output="no" name="RS_dataUsage" value="0"/>
</XMLAttributes>
</dataItem>
<dataItem aggregate="none" rollupAggregate="none" name="Last name">
<expression>[Sales (query)].[Sales staff].[Last name]</expression>
<XMLAttributes>
<XMLAttribute output="no" name="RS_dataType" value="3"/>
<XMLAttribute output="no" name="RS_dataUsage" value="0"/>
</XMLAttributes>
</dataItem>
<dataItem aggregate="none" rollupAggregate="none" name="First name">
<expression>[Sales (query)].[Sales staff].[First name]</expression>
<XMLAttributes>
<XMLAttribute output="no" name="RS_dataType" value="3"/>
<XMLAttribute output="no" name="RS_dataUsage" value="0"/>
</XMLAttributes>
</dataItem>
<dataItem aggregate="total" name="Quantity">
<expression>[Sales (query)].[Sales].[Quantity]</expression>
<XMLAttributes>
<XMLAttribute output="no" name="RS_dataType" value="1"/>
<XMLAttribute output="no" name="RS_dataUsage" value="2"/>
</XMLAttributes>
</dataItem>
<dataItem aggregate="total" name="Revenue">
<expression>[Sales (query)].[Sales].[Revenue]</expression>
<XMLAttributes>
<XMLAttribute output="no" name="RS_dataType" value="2"/>
<XMLAttribute output="no" name="RS_dataUsage" value="2"/>
</XMLAttributes>
</dataItem>
</selection>
<detailFilters>
<detailFilter>
<filterExpression>[Sales (query)].[Branch].[Country] not in (&apos;Australia&apos;, &apos;Austria&apos;, &apos;Belgium&apos;, &apos;China&apos;, &apos;Denmark&apos;, &apos;Finland&apos;, &apos;France&apos;, &apos;Germany&apos;, &apos;Italy&apos;, &apos;Japan&apos;, &apos;Korea&apos;, &apos;Netherlands&apos;, &apos;Singapore&apos;, &apos;Spain&apos;, &apos;Sweden&apos;, &apos;Switzerland&apos;, &apos;United Kingdom&apos;)</filterExpression>
</detailFilter>
</detailFilters>
</query>
</queries>
<modelPath>/content/folder[#name=&apos;Samples&apos;]/folder[#name=&apos;Models&apos;]/package[#name=&apos;GO sales (query)&apos;]/model[#name=&apos;model&apos;]</modelPath>
</report>
Also, here is a screen capture showing the problem.

IBM Support helped with this one. There is a known behaviour (I say issue) with the way blocks work on the page. The solution doesn't use blocks.
With the list selected go to ... | Headers & footers | List headers & footers.
Check List page header.
Alternative: If you want the header to show only the first time (not every page) use Overall header.
"Unlock" the report.
Drag the items from the block(s) to the header.
Delete the block(s).
Format the list header (I assume you don't want a border around it.)
You may need to create singletons to get the page data onto the list. In my case, I didn't.
Here's what my sample report looks like after these steps:
<report xmlns="http://developer.cognos.com/schemas/report/15.5/" useStyleVersion="11.6" expressionLocale="en-us">
<drillBehavior/>
<layouts>
<layout>
<reportPages>
<page name="Page1">
<style>
<defaultStyles>
<defaultStyle refStyle="pg"/>
</defaultStyles>
</style>
<pageBody>
<style>
<defaultStyles>
<defaultStyle refStyle="pb"/>
</defaultStyles>
</style>
<contents>
<block>
<contents>
</contents>
<style>
<CSS value="font-size:12pt;font-weight:bold;padding-top:2em"/>
</style>
</block>
<block>
<contents>
<list horizontalPagination="true" refQuery="West" name="List2" showColumnTitles="startOfDetails">
<noDataHandler>
<contents>
<block>
<contents>
<textItem>
<dataSource>
<staticValue>No Data Available</staticValue>
</dataSource>
</textItem>
</contents>
<style>
<CSS value="padding:16px;"/>
</style>
</block>
</contents>
</noDataHandler>
<style>
<CSS value="border-collapse:collapse;border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:none"/>
<defaultStyles>
<defaultStyle refStyle="ls"/>
</defaultStyles>
</style>
<listColumns>
<listColumn>
<listColumnTitle>
<style>
<defaultStyles>
<defaultStyle refStyle="lt"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemLabel refDataItem="Country"/>
</dataSource>
</textItem>
</contents>
</listColumnTitle>
<listColumnBody>
<style>
<defaultStyles>
<defaultStyle refStyle="lc"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemValue refDataItem="Country"/>
</dataSource>
</textItem>
</contents>
</listColumnBody>
</listColumn>
<listColumn>
<listColumnTitle>
<style>
<defaultStyles>
<defaultStyle refStyle="lt"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemLabel refDataItem="Province or state"/>
</dataSource>
</textItem>
</contents>
</listColumnTitle>
<listColumnBody>
<style>
<defaultStyles>
<defaultStyle refStyle="lc"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemValue refDataItem="Province or state"/>
</dataSource>
</textItem>
</contents>
</listColumnBody>
</listColumn>
<listColumn>
<listColumnTitle>
<style>
<defaultStyles>
<defaultStyle refStyle="lt"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemLabel refDataItem="Last name"/>
</dataSource>
</textItem>
</contents>
</listColumnTitle>
<listColumnBody>
<style>
<defaultStyles>
<defaultStyle refStyle="lc"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemValue refDataItem="Last name"/>
</dataSource>
</textItem>
</contents>
</listColumnBody>
</listColumn>
<listColumn>
<listColumnTitle>
<style>
<defaultStyles>
<defaultStyle refStyle="lt"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemLabel refDataItem="First name"/>
</dataSource>
</textItem>
</contents>
</listColumnTitle>
<listColumnBody>
<style>
<defaultStyles>
<defaultStyle refStyle="lc"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemValue refDataItem="First name"/>
</dataSource>
</textItem>
</contents>
</listColumnBody>
</listColumn>
<listColumn>
<listColumnTitle>
<style>
<defaultStyles>
<defaultStyle refStyle="lt"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemLabel refDataItem="Quantity"/>
</dataSource>
</textItem>
</contents>
</listColumnTitle>
<listColumnBody>
<style>
<defaultStyles>
<defaultStyle refStyle="lm"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemValue refDataItem="Quantity"/>
</dataSource>
</textItem>
</contents>
</listColumnBody>
</listColumn>
<listColumn>
<listColumnTitle>
<style>
<defaultStyles>
<defaultStyle refStyle="lt"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemLabel refDataItem="Revenue"/>
</dataSource>
</textItem>
</contents>
</listColumnTitle>
<listColumnBody>
<style>
<defaultStyles>
<defaultStyle refStyle="lm"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemValue refDataItem="Revenue"/>
</dataSource>
</textItem>
</contents>
</listColumnBody>
</listColumn>
</listColumns>
<sortList>
<sortItem refDataItem="Country"/>
<sortItem refDataItem="Province or state"/>
<sortItem refDataItem="Last name"/>
<sortItem refDataItem="First name"/>
</sortList>
<listPageHeader>
<listRows>
<listRow>
<rowCells>
<rowCell colSpan="6">
<contents>
<textItem>
<dataSource>
<staticValue>West</staticValue>
</dataSource>
</textItem>
</contents>
<style>
<defaultStyles>
<defaultStyle refStyle="lh"/>
</defaultStyles>
<CSS value="border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:none;font-weight:bold"/>
</style>
</rowCell>
</rowCells>
</listRow>
</listRows>
</listPageHeader>
</list>
</contents>
</block>
<block>
<contents>
</contents>
<style>
<CSS value="font-size:12pt;font-weight:bold;padding-top:2em"/>
</style>
</block>
<block>
<contents>
<list horizontalPagination="true" refQuery="East" name="List1" showColumnTitles="startOfDetails">
<noDataHandler>
<contents>
<block>
<contents>
<textItem>
<dataSource>
<staticValue>No Data Available</staticValue>
</dataSource>
</textItem>
</contents>
<style>
<CSS value="padding:16px;"/>
</style>
</block>
</contents>
</noDataHandler>
<style>
<CSS value="border-collapse:collapse"/>
<defaultStyles>
<defaultStyle refStyle="ls"/>
</defaultStyles>
</style>
<listColumns>
<listColumn>
<listColumnTitle>
<style>
<defaultStyles>
<defaultStyle refStyle="lt"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemLabel refDataItem="Country"/>
</dataSource>
</textItem>
</contents>
</listColumnTitle>
<listColumnBody>
<style>
<defaultStyles>
<defaultStyle refStyle="lc"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemValue refDataItem="Country"/>
</dataSource>
</textItem>
</contents>
</listColumnBody>
</listColumn>
<listColumn>
<listColumnTitle>
<style>
<defaultStyles>
<defaultStyle refStyle="lt"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemLabel refDataItem="Province or state"/>
</dataSource>
</textItem>
</contents>
</listColumnTitle>
<listColumnBody>
<style>
<defaultStyles>
<defaultStyle refStyle="lc"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemValue refDataItem="Province or state"/>
</dataSource>
</textItem>
</contents>
</listColumnBody>
</listColumn>
<listColumn>
<listColumnTitle>
<style>
<defaultStyles>
<defaultStyle refStyle="lt"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemLabel refDataItem="Last name"/>
</dataSource>
</textItem>
</contents>
</listColumnTitle>
<listColumnBody>
<style>
<defaultStyles>
<defaultStyle refStyle="lc"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemValue refDataItem="Last name"/>
</dataSource>
</textItem>
</contents>
</listColumnBody>
</listColumn>
<listColumn>
<listColumnTitle>
<style>
<defaultStyles>
<defaultStyle refStyle="lt"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemLabel refDataItem="First name"/>
</dataSource>
</textItem>
</contents>
</listColumnTitle>
<listColumnBody>
<style>
<defaultStyles>
<defaultStyle refStyle="lc"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemValue refDataItem="First name"/>
</dataSource>
</textItem>
</contents>
</listColumnBody>
</listColumn>
<listColumn>
<listColumnTitle>
<style>
<defaultStyles>
<defaultStyle refStyle="lt"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemLabel refDataItem="Quantity"/>
</dataSource>
</textItem>
</contents>
</listColumnTitle>
<listColumnBody>
<style>
<defaultStyles>
<defaultStyle refStyle="lm"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemValue refDataItem="Quantity"/>
</dataSource>
</textItem>
</contents>
</listColumnBody>
</listColumn>
<listColumn>
<listColumnTitle>
<style>
<defaultStyles>
<defaultStyle refStyle="lt"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemLabel refDataItem="Revenue"/>
</dataSource>
</textItem>
</contents>
</listColumnTitle>
<listColumnBody>
<style>
<defaultStyles>
<defaultStyle refStyle="lm"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemValue refDataItem="Revenue"/>
</dataSource>
</textItem>
</contents>
</listColumnBody>
</listColumn>
</listColumns>
<sortList>
<sortItem refDataItem="Country"/>
<sortItem refDataItem="Province or state"/>
<sortItem refDataItem="Last name"/>
<sortItem refDataItem="First name"/>
</sortList>
<listPageHeader>
<listRows>
<listRow>
<rowCells>
<rowCell colSpan="6">
<contents>
<textItem>
<dataSource>
<staticValue>East</staticValue>
</dataSource>
</textItem>
</contents>
<style>
<defaultStyles>
<defaultStyle refStyle="lh"/>
</defaultStyles>
<CSS value="border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:none;font-weight:bold"/>
</style>
</rowCell>
</rowCells>
</listRow>
</listRows>
</listPageHeader>
</list>
</contents>
</block>
</contents>
</pageBody>
<XMLAttributes>
<XMLAttribute output="no" name="RS_legacyDrillDown" value="0"/>
</XMLAttributes>
</page>
</reportPages>
<pageSetup>
<namedPaper name="/configuration/pageDefinition[#name=&apos;Letter&apos;]"/>
</pageSetup>
</layout>
</layouts>
<XMLAttributes>
<XMLAttribute output="no" name="RS_CreateExtendedDataItems" value="true"/>
<XMLAttribute output="no" name="listSeparator" value=","/>
<XMLAttribute output="no" name="decimalSeparator" value="."/>
<XMLAttribute output="no" name="RS_modelModificationTime" value="2015-11-25T21:38:24.820Z"/>
</XMLAttributes>
<queries>
<query name="East">
<source>
<model/>
</source>
<selection>
<dataItem aggregate="none" rollupAggregate="none" name="Country">
<expression>[Sales (query)].[Branch].[Country]</expression>
<XMLAttributes>
<XMLAttribute output="no" name="RS_dataType" value="3"/>
<XMLAttribute output="no" name="RS_dataUsage" value="0"/>
</XMLAttributes>
</dataItem>
<dataItem aggregate="none" rollupAggregate="none" name="Province or state">
<expression>[Sales (query)].[Branch].[Province or state]</expression>
<XMLAttributes>
<XMLAttribute output="no" name="RS_dataType" value="3"/>
<XMLAttribute output="no" name="RS_dataUsage" value="0"/>
</XMLAttributes>
</dataItem>
<dataItem aggregate="none" rollupAggregate="none" name="Last name">
<expression>[Sales (query)].[Sales staff].[Last name]</expression>
<XMLAttributes>
<XMLAttribute output="no" name="RS_dataType" value="3"/>
<XMLAttribute output="no" name="RS_dataUsage" value="0"/>
</XMLAttributes>
</dataItem>
<dataItem aggregate="none" rollupAggregate="none" name="First name">
<expression>[Sales (query)].[Sales staff].[First name]</expression>
<XMLAttributes>
<XMLAttribute output="no" name="RS_dataType" value="3"/>
<XMLAttribute output="no" name="RS_dataUsage" value="0"/>
</XMLAttributes>
</dataItem>
<dataItem aggregate="total" name="Quantity">
<expression>[Sales (query)].[Sales].[Quantity]</expression>
<XMLAttributes>
<XMLAttribute output="no" name="RS_dataType" value="1"/>
<XMLAttribute output="no" name="RS_dataUsage" value="2"/>
</XMLAttributes>
</dataItem>
<dataItem aggregate="total" name="Revenue">
<expression>[Sales (query)].[Sales].[Revenue]</expression>
<XMLAttributes>
<XMLAttribute output="no" name="RS_dataType" value="2"/>
<XMLAttribute output="no" name="RS_dataUsage" value="2"/>
</XMLAttributes>
</dataItem>
</selection>
<detailFilters>
<detailFilter>
<filterExpression>[Sales (query)].[Branch].[Country] in (&apos;Australia&apos;, &apos;Austria&apos;, &apos;Belgium&apos;, &apos;China&apos;, &apos;Denmark&apos;, &apos;Finland&apos;, &apos;France&apos;, &apos;Germany&apos;, &apos;Italy&apos;, &apos;Japan&apos;, &apos;Korea&apos;, &apos;Netherlands&apos;, &apos;Singapore&apos;, &apos;Spain&apos;, &apos;Sweden&apos;, &apos;Switzerland&apos;, &apos;United Kingdom&apos;)</filterExpression>
</detailFilter>
</detailFilters>
</query>
<query name="West">
<source>
<model/>
</source>
<selection>
<dataItem aggregate="none" rollupAggregate="none" name="Country">
<expression>[Sales (query)].[Branch].[Country]</expression>
<XMLAttributes>
<XMLAttribute output="no" name="RS_dataType" value="3"/>
<XMLAttribute output="no" name="RS_dataUsage" value="0"/>
</XMLAttributes>
</dataItem>
<dataItem aggregate="none" rollupAggregate="none" name="Province or state">
<expression>[Sales (query)].[Branch].[Province or state]</expression>
<XMLAttributes>
<XMLAttribute output="no" name="RS_dataType" value="3"/>
<XMLAttribute output="no" name="RS_dataUsage" value="0"/>
</XMLAttributes>
</dataItem>
<dataItem aggregate="none" rollupAggregate="none" name="Last name">
<expression>[Sales (query)].[Sales staff].[Last name]</expression>
<XMLAttributes>
<XMLAttribute output="no" name="RS_dataType" value="3"/>
<XMLAttribute output="no" name="RS_dataUsage" value="0"/>
</XMLAttributes>
</dataItem>
<dataItem aggregate="none" rollupAggregate="none" name="First name">
<expression>[Sales (query)].[Sales staff].[First name]</expression>
<XMLAttributes>
<XMLAttribute output="no" name="RS_dataType" value="3"/>
<XMLAttribute output="no" name="RS_dataUsage" value="0"/>
</XMLAttributes>
</dataItem>
<dataItem aggregate="total" name="Quantity">
<expression>[Sales (query)].[Sales].[Quantity]</expression>
<XMLAttributes>
<XMLAttribute output="no" name="RS_dataType" value="1"/>
<XMLAttribute output="no" name="RS_dataUsage" value="2"/>
</XMLAttributes>
</dataItem>
<dataItem aggregate="total" name="Revenue">
<expression>[Sales (query)].[Sales].[Revenue]</expression>
<XMLAttributes>
<XMLAttribute output="no" name="RS_dataType" value="2"/>
<XMLAttribute output="no" name="RS_dataUsage" value="2"/>
</XMLAttributes>
</dataItem>
</selection>
<detailFilters>
<detailFilter>
<filterExpression>[Sales (query)].[Branch].[Country] not in (&apos;Australia&apos;, &apos;Austria&apos;, &apos;Belgium&apos;, &apos;China&apos;, &apos;Denmark&apos;, &apos;Finland&apos;, &apos;France&apos;, &apos;Germany&apos;, &apos;Italy&apos;, &apos;Japan&apos;, &apos;Korea&apos;, &apos;Netherlands&apos;, &apos;Singapore&apos;, &apos;Spain&apos;, &apos;Sweden&apos;, &apos;Switzerland&apos;, &apos;United Kingdom&apos;)</filterExpression>
</detailFilter>
</detailFilters>
</query>
</queries>
<modelPath>/content/folder[#name=&apos;Samples&apos;]/folder[#name=&apos;Models&apos;]/package[#name=&apos;GO sales (query)&apos;]/model[#name=&apos;model&apos;]</modelPath>
</report>

Related

cognos list in a table by section how do I stop data break across page

enter image description hereCognos Report 11, I have a list inside of a table. The list is sectioned by two data items. How do I prevent the list to break across the page.
I want it to break the page when it finds the end of the page and the current section.
Invoice
List inside of a Table
I think you have placed items in your page header and page footer that belong in the section header and section footer.
Here is a report spec that demonstrates this.
You didn't specify which version of Cognos you are using. You may need to fiddle with the version numbers on the first line of this to make it work in your system.
<report xmlns="http://developer.cognos.com/schemas/report/15.5/" useStyleVersion="11.6" expressionLocale="en-us">
<drillBehavior/>
<layouts>
<layout>
<reportPages>
<pageSet name="Page set1" refQuery="Query1">
<detailPages>
<page name="Page1" refQuery="Query1">
<style>
<defaultStyles>
<defaultStyle refStyle="pg"/>
</defaultStyles>
</style>
<pageBody>
<style>
<defaultStyles>
<defaultStyle refStyle="pb"/>
</defaultStyles>
</style>
<contents>
<list showColumnTitles="hide" refQuery="Query1" name="List2">
<listColumns>
<listColumn>
<listColumnTitle>
<contents/>
</listColumnTitle>
<listColumnBody>
<contents>
<list horizontalPagination="true" name="List1" refQuery="Query1">
<noDataHandler>
<contents>
<block>
<contents>
<textItem>
<dataSource>
<staticValue>No Data Available</staticValue>
</dataSource>
</textItem>
</contents>
<style>
<CSS value="padding:16px;"/>
</style>
</block>
</contents>
</noDataHandler>
<style>
<CSS value="border-collapse:collapse"/>
<defaultStyles>
<defaultStyle refStyle="ls"/>
</defaultStyles>
</style>
<listColumns>
<listColumn>
<listColumnTitle>
<style>
<defaultStyles>
<defaultStyle refStyle="lt"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemLabel refDataItem="City"/>
</dataSource>
</textItem>
</contents>
</listColumnTitle>
<listColumnBody>
<style>
<defaultStyles>
<defaultStyle refStyle="lc"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemValue refDataItem="City"/>
</dataSource>
</textItem>
</contents>
</listColumnBody>
</listColumn>
<listColumn>
<listColumnTitle>
<style>
<defaultStyles>
<defaultStyle refStyle="lt"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemLabel refDataItem="Product line"/>
</dataSource>
</textItem>
</contents>
</listColumnTitle>
<listColumnBody>
<style>
<defaultStyles>
<defaultStyle refStyle="lc"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemValue refDataItem="Product line"/>
</dataSource>
</textItem>
</contents>
</listColumnBody>
</listColumn>
<listColumn>
<listColumnTitle>
<style>
<defaultStyles>
<defaultStyle refStyle="lt"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemLabel refDataItem="Last name"/>
</dataSource>
</textItem>
</contents>
</listColumnTitle>
<listColumnBody>
<style>
<defaultStyles>
<defaultStyle refStyle="lc"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemValue refDataItem="Last name"/>
</dataSource>
</textItem>
</contents>
</listColumnBody>
</listColumn>
<listColumn>
<listColumnTitle>
<style>
<defaultStyles>
<defaultStyle refStyle="lt"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemLabel refDataItem="First name"/>
</dataSource>
</textItem>
</contents>
</listColumnTitle>
<listColumnBody>
<style>
<defaultStyles>
<defaultStyle refStyle="lc"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemValue refDataItem="First name"/>
</dataSource>
</textItem>
</contents>
</listColumnBody>
</listColumn>
<listColumn>
<listColumnTitle>
<style>
<defaultStyles>
<defaultStyle refStyle="lt"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemLabel refDataItem="Revenue"/>
</dataSource>
</textItem>
</contents>
</listColumnTitle>
<listColumnBody>
<style>
<defaultStyles>
<defaultStyle refStyle="lm"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemValue refDataItem="Revenue"/>
</dataSource>
</textItem>
</contents>
</listColumnBody>
</listColumn>
</listColumns>
<sortList>
<sortItem refDataItem="City"/>
<sortItem refDataItem="Product line"/>
<sortItem refDataItem="Last name"/>
<sortItem refDataItem="First name"/>
</sortList>
</list>
</contents>
<style>
<defaultStyles>
<defaultStyle refStyle="sb"/>
</defaultStyles>
</style>
</listColumnBody>
</listColumn>
</listColumns>
<style>
<CSS value="border-collapse:collapse; width:100%"/>
<defaultStyles>
<defaultStyle refStyle="sc"/>
</defaultStyles>
</style>
<listGroups>
<listGroup refDataItem="Country">
<listHeader>
<listRows>
<listRow>
<rowCells>
<rowCell>
<contents>
<textItem>
<dataSource>
<dataItemLabel refDataItem="Country"/>
</dataSource>
</textItem>
<textItem>
<dataSource>
<staticValue>: </staticValue>
</dataSource>
</textItem>
<textItem>
<dataSource>
<dataItemValue refDataItem="Country"/>
</dataSource>
</textItem>
<textItem>
<dataSource>
<staticValue> header</staticValue>
</dataSource>
</textItem>
</contents>
<style>
<defaultStyles>
<defaultStyle refStyle="sh"/>
</defaultStyles>
</style>
</rowCell>
</rowCells>
</listRow>
</listRows>
</listHeader>
<listFooter>
<listRows>
<listRow>
<rowCells>
<rowCell>
<contents>
<textItem>
<dataSource>
<dataItemValue refDataItem="Country"/>
</dataSource>
</textItem>
<textItem>
<dataSource>
<staticValue> footer</staticValue>
</dataSource>
</textItem>
</contents>
<style>
<defaultStyles>
<defaultStyle refStyle="of"/>
</defaultStyles>
</style>
</rowCell>
</rowCells>
</listRow>
</listRows>
</listFooter>
<sortList>
<sortItem refDataItem="Country"/>
</sortList>
</listGroup>
</listGroups>
<sectionsFrame sectionedEdge="columns" refFrame="List1"/>
<masterDetailLinks>
<masterDetailLink>
<masterContext>
<dataItemContext refDataItem="Country"/>
</masterContext>
<detailContext>
<dataItemContext refDataItem="Country"/>
</detailContext>
</masterDetailLink>
</masterDetailLinks>
</list>
</contents>
</pageBody>
<pageHeader>
<contents>
<textItem>
<dataSource>
<staticValue>page header</staticValue>
</dataSource>
</textItem>
</contents>
</pageHeader>
<pageFooter>
<contents>
<textItem>
<dataSource>
<staticValue>page footer</staticValue>
</dataSource>
</textItem>
</contents>
</pageFooter>
<masterDetailLinks>
<masterDetailLink>
<masterContext>
<dataItemContext refDataItem="Country"/>
</masterContext>
<detailContext>
<dataItemContext refDataItem="Country"/>
</detailContext>
</masterDetailLink>
</masterDetailLinks>
<XMLAttributes>
<XMLAttribute output="no" name="RS_legacyDrillDown" value="0"/>
</XMLAttributes>
</page>
</detailPages>
<pageGroups>
<pageGroup refDataItem="Country">
<sortList>
<sortItem refDataItem="Country"/>
</sortList>
</pageGroup>
</pageGroups>
</pageSet>
</reportPages>
</layout>
</layouts>
<XMLAttributes>
<XMLAttribute output="no" name="RS_CreateExtendedDataItems" value="true"/>
<XMLAttribute output="no" name="listSeparator" value=","/>
<XMLAttribute output="no" name="decimalSeparator" value="."/>
<XMLAttribute output="no" name="RS_modelModificationTime" value="2015-11-25T21:38:24.820Z"/>
</XMLAttributes>
<queries>
<query name="Query1">
<source>
<model/>
</source>
<selection>
<dataItem aggregate="total" name="Revenue">
<expression>[Sales (query)].[Sales].[Revenue]</expression>
<XMLAttributes>
<XMLAttribute output="no" name="RS_dataType" value="2"/>
<XMLAttribute output="no" name="RS_dataUsage" value="2"/>
</XMLAttributes>
</dataItem>
<dataItem aggregate="none" rollupAggregate="none" name="Country">
<expression>[Sales (query)].[Branch].[Country]</expression>
<XMLAttributes>
<XMLAttribute output="no" name="RS_dataType" value="3"/>
<XMLAttribute output="no" name="RS_dataUsage" value="0"/>
</XMLAttributes>
</dataItem>
<dataItem aggregate="none" rollupAggregate="none" name="City">
<expression>[Sales (query)].[Branch].[City]</expression>
<XMLAttributes>
<XMLAttribute output="no" name="RS_dataType" value="3"/>
<XMLAttribute output="no" name="RS_dataUsage" value="0"/>
</XMLAttributes>
</dataItem>
<dataItem aggregate="none" rollupAggregate="none" name="Last name">
<expression>[Sales (query)].[Sales staff].[Last name]</expression>
<XMLAttributes>
<XMLAttribute output="no" name="RS_dataType" value="3"/>
<XMLAttribute output="no" name="RS_dataUsage" value="0"/>
</XMLAttributes>
</dataItem>
<dataItem aggregate="none" rollupAggregate="none" name="First name">
<expression>[Sales (query)].[Sales staff].[First name]</expression>
<XMLAttributes>
<XMLAttribute output="no" name="RS_dataType" value="3"/>
<XMLAttribute output="no" name="RS_dataUsage" value="0"/>
</XMLAttributes>
</dataItem>
<dataItem aggregate="none" rollupAggregate="none" name="Product line">
<expression>[Sales (query)].[Products].[Product line]</expression>
<XMLAttributes>
<XMLAttribute output="no" name="RS_dataType" value="3"/>
<XMLAttribute output="no" name="RS_dataUsage" value="0"/>
</XMLAttributes>
</dataItem>
</selection>
</query>
</queries>
<modelPath>/content/folder[#name=&apos;Samples&apos;]/folder[#name=&apos;Models&apos;]/package[#name=&apos;GO sales (query)&apos;]/model[#name=&apos;model&apos;]</modelPath>
</report>

Cognos 11 - One column List wrap

I have a report that has one column list report that is sectioned off based on a data item. What i would like to do is have that one column continue horizontally instead of vertically so it fits on one page. I tried using repeater and repeater table but it did not give the desired results. I attached an image of what it looks like and what i would want it to look like to better illustrate what i want to do. I wanted to avoid using multiple queries and let the report do much of the heavy listing because new headers could get added/removed as well as the names underneath could change so i wanted to prevent manual intervention as much as possible.
A double repeater table with a master detail relationship will most likely be the way to go.
<drillBehavior/>
<layouts>
<layout>
<reportPages>
<page name="Page1">
<style>
<defaultStyles>
<defaultStyle refStyle="pg"/>
</defaultStyles>
</style>
<pageBody>
<style>
<defaultStyles>
<defaultStyle refStyle="pb"/>
</defaultStyles>
</style>
<contents><repeaterTable across="2" name="Repeater table1" refQuery="Header">
<repeaterTableCell>
<contents><table><style><defaultStyles><defaultStyle refStyle="tb"/></defaultStyles><CSS value="border-collapse:collapse;height:100%"/></style><tableRows><tableRow><tableCells><tableCell><contents><table><style><defaultStyles><defaultStyle refStyle="tb"/></defaultStyles><CSS value="border-collapse:collapse;height:100%"/></style><tableRows><tableRow><tableCells><tableCell><contents><textItem><dataSource><dataItemValue refDataItem="Product line"/></dataSource></textItem></contents><style><CSS value="text-align:left;vertical-align:top"/></style></tableCell></tableCells></tableRow></tableRows></table><repeaterTable name="Repeater table2" refQuery="Detail" across="1">
<repeaterTableCell>
<contents><textItem><dataSource><dataItemValue refDataItem="Product type"/></dataSource></textItem></contents>
<style>
<CSS value="padding:4px"/>
<defaultStyles>
<defaultStyle refStyle="rc"/>
</defaultStyles>
</style>
</repeaterTableCell>
<style>
<CSS value="border-collapse:collapse"/>
<defaultStyles>
<defaultStyle refStyle="rt"/>
</defaultStyles>
</style>
<masterDetailLinks><masterDetailLink><masterContext><dataItemContext refDataItem="Product line"/></masterContext><detailContext><dataItemContext refDataItem="Product line"/></detailContext></masterDetailLink></masterDetailLinks></repeaterTable></contents><style><CSS value="text-align:left;vertical-align:top"/><defaultStyles><defaultStyle refStyle="GuidedLayoutRightPadding"/></defaultStyles></style></tableCell><tableCell><contents/><style><CSS value="text-align:left;vertical-align:top"/></style></tableCell></tableCells></tableRow></tableRows></table></contents>
<style>
<CSS value="padding:4px"/>
<defaultStyles>
<defaultStyle refStyle="rc"/>
</defaultStyles>
</style>
</repeaterTableCell>
<style>
<CSS value="border-collapse:collapse"/>
<defaultStyles>
<defaultStyle refStyle="rt"/>
</defaultStyles>
</style>
</repeaterTable></contents>
</pageBody>
</page>
</reportPages>
</layout>
</layouts>
<queries><query name="Header"><source><model/></source><selection><dataItem aggregate="none" rollupAggregate="none" name="Product line"><expression>[Sales (query)].[Products].[Product line]</expression><XMLAttributes><XMLAttribute output="no" name="RS_dataType" value="3"/><XMLAttribute output="no" name="RS_dataUsage" value="0"/></XMLAttributes></dataItem></selection></query><query name="Detail"><source><model/></source><selection><dataItem aggregate="none" rollupAggregate="none" name="Product line"><expression>[Sales (query)].[Products].[Product line]</expression><XMLAttributes><XMLAttribute output="no" name="RS_dataType" value="3"/><XMLAttribute output="no" name="RS_dataUsage" value="0"/></XMLAttributes></dataItem><dataItem aggregate="none" rollupAggregate="none" name="Product type"><expression>[Sales (query)].[Products].[Product type]</expression><XMLAttributes><XMLAttribute output="no" name="RS_dataType" value="3"/><XMLAttribute output="no" name="RS_dataUsage" value="0"/></XMLAttributes></dataItem></selection></query></queries><XMLAttributes><XMLAttribute output="no" name="RS_CreateExtendedDataItems" value="true"/><XMLAttribute output="no" name="listSeparator" value=","/><XMLAttribute output="no" name="decimalSeparator" value="."/></XMLAttributes><classStyles><classStyle name="GuidedLayoutLeftPadding"><CSS value="padding-left:5px;border-top-width:1px;border-bottom-width:1px;border-left-width:1px;border-right-width:1px"/></classStyle><classStyle name="GuidedLayoutTopPadding"><CSS value="padding-top:5px;border-top-width:1px;border-bottom-width:1px;border-left-width:1px;border-right-width:1px"/></classStyle><classStyle name="GuidedLayoutRightPadding"><CSS value="padding-right:5px;border-top-width:1px;border-bottom-width:1px;border-left-width:1px;border-right-width:1px"/></classStyle><classStyle name="GuidedLayoutBottomPadding"><CSS value="padding-bottom:5px;border-top-width:1px;border-bottom-width:1px;border-left-width:1px;border-right-width:1px"/></classStyle><classStyle name="GuidedLayoutMargin"><CSS value="margin-bottom:10px"/></classStyle></classStyles><modelPath>/content/folder[#name=&apos;Samples&apos;]/folder[#name=&apos;Models&apos;]/package[#name=&apos;GO sales (query)&apos;]/model[#name=&apos;model&apos;]</modelPath></report>

Create array of values in Cognos

Is there a way to create an array of values for a given field in Cognos Report Studio?
Say one expense has 5 attendees. If I bring in fields expense & attendees, this will create 5 rows since the granularity is forced down to the attendee level rather the expense level.
Can I force this back into one row where the attendee column is a comma separated value or array of some sorts?
Extract:
+---------+----------+-----------+------------+
| Expense | Employee | Entry Key | Attendee |
+---------+----------+-----------+------------+
| Meal | Iron Man | 1 | Thor |
+---------+----------+-----------+------------+
| Meal | Iron Man | 1 | Hulk |
+---------+----------+-----------+------------+
| Meal | Iron Man | 1 | Spider Man |
+---------+----------+-----------+------------+
| Meal | Iron Man | 1 | Star Lord |
+---------+----------+-----------+------------+
| Meal | Iron Man | 1 | Thanos |
+---------+----------+-----------+------------+
Desired Extract:
+---------+----------+-----------+-------------------------------------------+
| Expense | Employee | Entry Key | Attendee |
+---------+----------+-----------+-------------------------------------------+
| Meal | Iron Man | 1 | Thor, Hulk, Spider Man, Star Lord, Thanos |
+---------+----------+-----------+-------------------------------------------+
limited to calculated fields/equations Assuming this will take a subquery and then joining back to a full query using entry key. Not sure if this is possible in calculated fields
Use a repeater table simple query structure. This will create a comma for each value (before or after) and make it impossible to omit the comma either before the first value or after the last value.
Here's a sample report:
You didn't say what version of Cognos. This is for 11.0.13. You may need to update the version number and style version in the first line to match your environment.
<report xmlns="http://developer.cognos.com/schemas/report/14.3/" useStyleVersion="11.4" expressionLocale="en-us">
<drillBehavior/>
<layouts>
<layout>
<reportPages>
<page name="Page1">
<style>
<defaultStyles>
<defaultStyle refStyle="pg"/>
</defaultStyles>
</style>
<pageBody>
<style>
<defaultStyles>
<defaultStyle refStyle="pb"/>
</defaultStyles>
</style>
<contents>
<list horizontalPagination="true" name="List1" refQuery="Query1">
<noDataHandler>
<contents>
<block>
<contents>
<textItem>
<dataSource>
<staticValue>No Data Available</staticValue>
</dataSource>
<style>
<CSS value="padding:10px 18px;"/>
</style>
</textItem>
</contents>
</block>
</contents>
</noDataHandler>
<style>
<CSS value="border-collapse:collapse"/>
<defaultStyles>
<defaultStyle refStyle="ls"/>
</defaultStyles>
</style>
<listColumns>
<listColumn>
<listColumnTitle>
<style>
<defaultStyles>
<defaultStyle refStyle="lt"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemLabel refDataItem="Country"/>
</dataSource>
</textItem>
</contents>
</listColumnTitle>
<listColumnBody>
<style>
<defaultStyles>
<defaultStyle refStyle="lc"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemValue refDataItem="Country"/>
</dataSource>
</textItem>
</contents>
</listColumnBody>
</listColumn>
<listColumn>
<listColumnTitle>
<style>
<defaultStyles>
<defaultStyle refStyle="lt"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<staticValue>Retailer Type</staticValue>
</dataSource>
</textItem>
</contents>
</listColumnTitle>
<listColumnBody>
<style>
<defaultStyles>
<defaultStyle refStyle="lc"/>
</defaultStyles>
</style>
<contents>
<repeaterTable name="Repeater table1" refQuery="Query1" across="20" down="1">
<repeaterTableCell>
<contents>
<textItem>
<dataSource>
<dataItemValue refDataItem="Retailer type"/>
</dataSource>
</textItem>
<textItem>
<dataSource>
<staticValue>, </staticValue>
</dataSource>
</textItem>
</contents>
<style>
<defaultStyles>
<defaultStyle refStyle="rc"/>
</defaultStyles>
<CSS value="padding:0px;font-size:8pt"/>
</style>
</repeaterTableCell>
<style>
<CSS value="border-collapse:collapse"/>
<defaultStyles>
<defaultStyle refStyle="rt"/>
</defaultStyles>
</style>
<masterDetailLinks>
<masterDetailLink>
<masterContext>
<dataItemContext refDataItem="Country"/>
</masterContext>
<detailContext>
<dataItemContext refDataItem="Country"/>
</detailContext>
</masterDetailLink>
</masterDetailLinks>
</repeaterTable>
</contents>
</listColumnBody>
</listColumn>
<listColumn>
<listColumnTitle>
<style>
<defaultStyles>
<defaultStyle refStyle="lt"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemLabel refDataItem="Quantity"/>
</dataSource>
</textItem>
</contents>
</listColumnTitle>
<listColumnBody>
<style>
<defaultStyles>
<defaultStyle refStyle="lm"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemValue refDataItem="Quantity"/>
</dataSource>
</textItem>
</contents>
</listColumnBody>
</listColumn>
</listColumns>
<listOverallGroup>
<listFooter>
<listRows>
<listRow>
<rowCells>
<rowCell colSpan="2">
<contents>
<textItem>
<dataSource>
<staticValue>Overall</staticValue>
</dataSource>
</textItem>
<textItem>
<dataSource>
<staticValue> - </staticValue>
</dataSource>
</textItem>
<textItem>
<dataSource>
<staticValue>Summary</staticValue>
</dataSource>
</textItem>
</contents>
<style>
<defaultStyles>
<defaultStyle refStyle="if"/>
</defaultStyles>
</style>
</rowCell>
<rowCell>
<contents>
<textItem>
<dataSource>
<dataItemValue refDataItem="Summary(Quantity)"/>
</dataSource>
</textItem>
</contents>
<style>
<defaultStyles>
<defaultStyle refStyle="is"/>
</defaultStyles>
</style>
</rowCell>
</rowCells>
</listRow>
</listRows>
</listFooter>
</listOverallGroup>
</list>
</contents>
</pageBody>
</page>
</reportPages>
</layout>
</layouts>
<XMLAttributes>
<XMLAttribute output="no" name="RS_CreateExtendedDataItems" value="true"/>
<XMLAttribute output="no" name="RS_modelModificationTime" value="2015-11-25T21:38:24.820Z"/>
<XMLAttribute output="no" name="listSeparator" value=","/>
</XMLAttributes>
<modelPath>/content/folder[#name=&apos;Samples&apos;]/folder[#name=&apos;Models&apos;]/package[#name=&apos;GO sales (query)&apos;]/model[#name=&apos;model&apos;]</modelPath>
<queries>
<query name="Query1">
<source>
<model/>
</source>
<selection>
<dataItem aggregate="none" rollupAggregate="none" name="Country" sort="ascending">
<expression>[Sales (query)].[Branch].[Country]</expression>
<XMLAttributes>
<XMLAttribute output="no" name="RS_dataType" value="3"/>
<XMLAttribute output="no" name="RS_dataUsage" value="attribute"/>
</XMLAttributes>
</dataItem>
<dataItem aggregate="none" rollupAggregate="none" name="Retailer type" sort="ascending">
<expression>[Sales (query)].[Retailer type].[Retailer type]</expression>
<XMLAttributes>
<XMLAttribute output="no" name="RS_dataType" value="3"/>
<XMLAttribute output="no" name="RS_dataUsage" value="attribute"/>
</XMLAttributes>
</dataItem>
<dataItem aggregate="total" name="Quantity">
<expression>[Sales (query)].[Sales].[Quantity]</expression>
<XMLAttributes>
<XMLAttribute output="no" name="RS_dataType" value="1"/>
<XMLAttribute output="no" name="RS_dataUsage" value="fact"/>
</XMLAttributes>
</dataItem>
<dataItemListSummary refDataItem="Quantity" aggregateMethod="aggregate" name="Summary(Quantity)"/>
</selection>
<detailFilters>
<detailFilter>
<filterExpression>[Sales (query)].[Time].[Year] = 2013</filterExpression>
</detailFilter>
</detailFilters>
</query>
</queries>
<reportName>Repeater Table (simple - using Samples data)</reportName>
</report>
Use a repeater table with a complex query structure to include the commas only between values (not at the beginning or the end). Here's a sample report:
You didn't say what version of Cognos. This is for 11.0.13. You may need to update the version number and style version in the first line to match your environment.
<report xmlns="http://developer.cognos.com/schemas/report/14.3/" useStyleVersion="11.4" expressionLocale="en-us">
<drillBehavior/>
<layouts>
<layout>
<reportPages>
<page name="Page1">
<style>
<defaultStyles>
<defaultStyle refStyle="pg"/>
</defaultStyles>
</style>
<pageBody>
<style>
<defaultStyles>
<defaultStyle refStyle="pb"/>
</defaultStyles>
</style>
<contents>
<list horizontalPagination="true" name="List1" refQuery="Query3">
<noDataHandler>
<contents>
<block>
<contents>
<textItem>
<dataSource>
<staticValue>No Data Available</staticValue>
</dataSource>
<style>
<CSS value="padding:10px 18px;"/>
</style>
</textItem>
</contents>
</block>
</contents>
</noDataHandler>
<style>
<CSS value="border-collapse:collapse"/>
<defaultStyles>
<defaultStyle refStyle="ls"/>
</defaultStyles>
</style>
<listColumns>
<listColumn>
<listColumnTitle>
<style>
<defaultStyles>
<defaultStyle refStyle="lt"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemLabel refDataItem="Country"/>
</dataSource>
</textItem>
</contents>
</listColumnTitle>
<listColumnBody>
<style>
<defaultStyles>
<defaultStyle refStyle="lc"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemValue refDataItem="Country"/>
</dataSource>
</textItem>
</contents>
</listColumnBody>
</listColumn>
<listColumn>
<listColumnTitle>
<style>
<defaultStyles>
<defaultStyle refStyle="lt"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<staticValue>Retailer Type</staticValue>
</dataSource>
</textItem>
</contents>
</listColumnTitle>
<listColumnBody>
<style>
<defaultStyles>
<defaultStyle refStyle="lc"/>
</defaultStyles>
</style>
<contents>
<repeaterTable across="20" down="1" name="Repeater table1" refQuery="Query2">
<repeaterTableCell>
<contents>
<textItem>
<dataSource>
<dataItemValue refDataItem="Retailer type"/>
</dataSource>
</textItem>
<textItem>
<dataSource>
<dataItemValue refDataItem="Comma"/>
</dataSource>
</textItem>
</contents>
<style>
<defaultStyles>
<defaultStyle refStyle="rc"/>
</defaultStyles>
<CSS value="padding:0px;font-size:8pt"/>
</style>
</repeaterTableCell>
<style>
<CSS value="border-collapse:collapse"/>
<defaultStyles>
<defaultStyle refStyle="rt"/>
</defaultStyles>
</style>
<masterDetailLinks>
<masterDetailLink>
<masterContext>
<dataItemContext refDataItem="Country"/>
</masterContext>
<detailContext>
<dataItemContext refDataItem="Country"/>
</detailContext>
</masterDetailLink>
</masterDetailLinks>
</repeaterTable>
</contents>
</listColumnBody>
</listColumn>
<listColumn>
<listColumnTitle>
<style>
<defaultStyles>
<defaultStyle refStyle="lt"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemLabel refDataItem="Quantity"/>
</dataSource>
</textItem>
</contents>
</listColumnTitle>
<listColumnBody>
<style>
<defaultStyles>
<defaultStyle refStyle="lm"/>
</defaultStyles>
</style>
<contents>
<textItem>
<dataSource>
<dataItemValue refDataItem="Quantity"/>
</dataSource>
</textItem>
</contents>
</listColumnBody>
</listColumn>
</listColumns>
<listOverallGroup>
<listFooter>
<listRows>
<listRow>
<rowCells>
<rowCell colSpan="2">
<contents>
<textItem>
<dataSource>
<staticValue>Overall</staticValue>
</dataSource>
</textItem>
<textItem>
<dataSource>
<staticValue> - </staticValue>
</dataSource>
</textItem>
<textItem>
<dataSource>
<staticValue>Summary</staticValue>
</dataSource>
</textItem>
</contents>
<style>
<defaultStyles>
<defaultStyle refStyle="if"/>
</defaultStyles>
</style>
</rowCell>
<rowCell>
<contents>
<textItem>
<dataSource>
<dataItemValue refDataItem="Summary(Quantity)"/>
</dataSource>
</textItem>
</contents>
<style>
<defaultStyles>
<defaultStyle refStyle="is"/>
</defaultStyles>
</style>
</rowCell>
</rowCells>
</listRow>
</listRows>
</listFooter>
</listOverallGroup>
</list>
</contents>
</pageBody>
</page>
</reportPages>
</layout>
</layouts>
<XMLAttributes>
<XMLAttribute output="no" name="RS_CreateExtendedDataItems" value="true"/>
<XMLAttribute output="no" name="listSeparator" value=","/>
</XMLAttributes>
<modelPath>/content/folder[#name=&apos;Samples&apos;]/folder[#name=&apos;Models&apos;]/package[#name=&apos;GO sales (query)&apos;]/model[#name=&apos;model&apos;]</modelPath>
<queries>
<query name="Query1">
<source>
<model/>
</source>
<selection>
<dataItem aggregate="none" rollupAggregate="none" name="Country" sort="ascending">
<expression>[Sales (query)].[Branch].[Country]</expression>
<XMLAttributes>
<XMLAttribute output="no" name="RS_dataType" value="3"/>
<XMLAttribute output="no" name="RS_dataUsage" value="attribute"/>
</XMLAttributes>
</dataItem>
<dataItem aggregate="none" rollupAggregate="none" name="Retailer type" sort="ascending">
<expression>[Sales (query)].[Retailer type].[Retailer type]</expression>
<XMLAttributes>
<XMLAttribute output="no" name="RS_dataType" value="3"/>
<XMLAttribute output="no" name="RS_dataUsage" value="attribute"/>
</XMLAttributes>
</dataItem>
<dataItem aggregate="total" name="Quantity">
<expression>[Sales (query)].[Sales].[Quantity]</expression>
<XMLAttributes>
<XMLAttribute output="no" name="RS_dataType" value="1"/>
<XMLAttribute output="no" name="RS_dataUsage" value="fact"/>
</XMLAttributes>
</dataItem>
<dataItemListSummary refDataItem="Quantity" aggregateMethod="aggregate" name="Summary(Quantity)"/>
</selection>
<detailFilters>
<detailFilter>
<filterExpression>[Sales (query)].[Time].[Year] = 2013</filterExpression>
</detailFilter>
</detailFilters>
</query>
<query name="Query2">
<source>
<queryRef refQuery="Query1"/>
</source>
<selection>
<dataItem aggregate="none" rollupAggregate="none" name="Country">
<expression>[Query1].[Country]</expression>
</dataItem>
<dataItem aggregate="none" rollupAggregate="none" name="Retailer type">
<expression>[Query1].[Retailer type]</expression>
<XMLAttributes>
<XMLAttribute output="no" name="RS_dataType" value="3"/>
<XMLAttribute output="no" name="RS_dataUsage" value="0"/>
</XMLAttributes>
</dataItem>
<dataItem name="Comma">
<expression>case
when running-count ([Retailer type] for [Country]) < maximum (running-count ([Retailer type] for [Country]) for [Country]) then &apos;,&apos;
else &apos;&apos;
end</expression>
<XMLAttributes>
<XMLAttribute output="no" name="RS_dataType" value="3"/>
<XMLAttribute output="no" name="RS_dataUsage" value=""/>
</XMLAttributes>
</dataItem>
</selection>
</query>
<query name="Query3">
<source>
<queryRef refQuery="Query1"/>
</source>
<selection>
<dataItemListSummary aggregateMethod="aggregate" name="Summary(Quantity)" refDataItem="Quantity"/>
<dataItem aggregate="none" rollupAggregate="none" name="Country">
<expression>[Query1].[Country]</expression>
<XMLAttributes>
<XMLAttribute output="no" name="RS_dataType" value="3"/>
<XMLAttribute output="no" name="RS_dataUsage" value="0"/>
</XMLAttributes>
</dataItem>
<dataItem aggregate="total" name="Quantity">
<expression>[Query1].[Quantity]</expression>
<XMLAttributes>
<XMLAttribute output="no" name="RS_dataType" value="2"/>
<XMLAttribute output="no" name="RS_dataUsage" value="2"/>
</XMLAttributes>
</dataItem>
</selection>
</query>
</queries>
<reportName>Repeater Table (using Samples data)</reportName>
</report>

mahapps.metro using icons styles with datatrigger

I want to data trigger on an Icon but i can not find out how to do this :( I tried this code baut is does not work can any one help pleaaaase ?
<Style x:Key="ConnectionIcon" TargetType="{x:Type Rectangle}">
<Style.Triggers>
<DataTrigger Binding="{Binding Path=ConnectionStatus}" Value="True">
<Setter Property="Resources">
<Setter.Value>
<SolidColorBrush Color="Green" />
</Setter.Value>
</Setter>
<Setter Property="Fill">
<Setter.Value>
<VisualBrush Stretch="Fill" Visual="{StaticResource appbar_disconnect}" />
</Setter.Value>
</Setter>
</DataTrigger>
<DataTrigger Binding="{Binding Path=ConnectionStatus}" Value="False">
<Setter Property="Resources">
<Setter.Value>
<SolidColorBrush Color="Red" />
</Setter.Value>
</Setter>
<Setter Property="Fill">
<Setter.Value>
<VisualBrush Stretch="Fill" Visual="{StaticResource appbar_connect}" />
</Setter.Value>
</Setter>
</DataTrigger>
</Style.Triggers>
</Style>
Here is a little trick for this by using the OpacityMask and simple change the Fill property of the Rectangle.
<Style x:Key="ConnectionIcon"
TargetType="{x:Type Rectangle}">
<Style.Triggers>
<DataTrigger Binding="{Binding Path=ConnectionStatus}"
Value="True">
<Setter Property="Fill"
Value="Green" />
<Setter Property="OpacityMask">
<Setter.Value>
<VisualBrush Stretch="Fill"
Visual="{StaticResource appbar_disconnect}" />
</Setter.Value>
</Setter>
</DataTrigger>
<DataTrigger Binding="{Binding Path=ConnectionStatus}"
Value="False">
<Setter Property="Fill"
Value="Red" />
<Setter Property="OpacityMask">
<Setter.Value>
<VisualBrush Stretch="Fill"
Visual="{StaticResource appbar_connect}" />
</Setter.Value>
</Setter>
</DataTrigger>
</Style.Triggers>
</Style>
Hope this helps.

Adding a Combobox column in infragistics XamDataGrid

How can I add a WPF ComboBox Column to Infragistics XamDataGrid?
Try this example
<dataPresenter:XamDataGrid x:Name="StudentDataGrid" DataSource="{Binding StudentList}">
<dataPresenter:XamDataGrid.FieldLayoutSettings>
<dataPresenter:FieldLayoutSettings AutoGenerateFields="False" AutoFitMode="Always" AddNewRecordLocation="OnTopFixed" AllowAddNew="True" AllowDelete="True"/>
</dataPresenter:XamDataGrid.FieldLayoutSettings>
<dataPresenter:XamDataGrid.FieldLayouts>
<dataPresenter:FieldLayout>
<dataPresenter:Field Name="Name" Label="Student Name"/>
<dataPresenter:Field Width="Auto" Name="Department" Label="Dept">
<dataPresenter:Field.Settings>
<dataPresenter:FieldSettings>
<dataPresenter:FieldSettings.EditorStyle>
<Style TargetType="{x:Type igEditors:XamComboEditor}">
<Setter Property="ItemsSource" Value="{Binding DataPresenter.DataContext.DepartmentList}" />
<Setter Property="IsEditable" Value="True" />
<Setter Property="Text" Value="-Select-" />
<Setter Property="DisplayMemberPath" Value="DeptName" />
<Setter Property="ValuePath" Value="DeptName" />
</Style>
</dataPresenter:FieldSettings.EditorStyle>
</dataPresenter:FieldSettings>
</dataPresenter:Field.Settings>
</dataPresenter:Field>
<dataPresenter:Field Name="Count" Label="Count"/>
</dataPresenter:FieldLayout>
</dataPresenter:XamDataGrid.FieldLayouts>
</dataPresenter:XamDataGrid>
You can use the XamComboEditor to edit fields in the XamDataGrid:
http://help.infragistics.com/NetAdvantage/WPF/2011.1/CLR4.0/?page=xamComboEditor_Using_xamComboEditor_to_Edit_a_Field_in_xamDataGrid.html
Alan

Resources