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='Samples']/folder[#name='Models']/package[#name='GO sales (query)']/model[#name='model']</modelPath>
</report>
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='Letter']"/>
</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 ('Australia', 'Austria', 'Belgium', 'China', 'Denmark', 'Finland', 'France', 'Germany', 'Italy', 'Japan', 'Korea', 'Netherlands', 'Singapore', 'Spain', 'Sweden', 'Switzerland', 'United Kingdom')</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 ('Australia', 'Austria', 'Belgium', 'China', 'Denmark', 'Finland', 'France', 'Germany', 'Italy', 'Japan', 'Korea', 'Netherlands', 'Singapore', 'Spain', 'Sweden', 'Switzerland', 'United Kingdom')</filterExpression>
</detailFilter>
</detailFilters>
</query>
</queries>
<modelPath>/content/folder[#name='Samples']/folder[#name='Models']/package[#name='GO sales (query)']/model[#name='model']</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='Letter']"/>
</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 ('Australia', 'Austria', 'Belgium', 'China', 'Denmark', 'Finland', 'France', 'Germany', 'Italy', 'Japan', 'Korea', 'Netherlands', 'Singapore', 'Spain', 'Sweden', 'Switzerland', 'United Kingdom')</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 ('Australia', 'Austria', 'Belgium', 'China', 'Denmark', 'Finland', 'France', 'Germany', 'Italy', 'Japan', 'Korea', 'Netherlands', 'Singapore', 'Spain', 'Sweden', 'Switzerland', 'United Kingdom')</filterExpression>
</detailFilter>
</detailFilters>
</query>
</queries>
<modelPath>/content/folder[#name='Samples']/folder[#name='Models']/package[#name='GO sales (query)']/model[#name='model']</modelPath>
</report>
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='Samples']/folder[#name='Models']/package[#name='GO sales (query)']/model[#name='model']</modelPath></report>
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.
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