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

 

News:

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

Main Menu

No data Contents Repeating on Every Page

Started by mrcool, 05 Jun 2011 09:21:58 PM

Previous topic - Next topic

mrcool

Hi All,

I have a report with multiple lists in it. I have a text placed in 'No Content Contents' Tab. This text is reapting on all the pages of the output. Is it possible to restrict it to a page? I used tables and pagination property but it didn't work. Any thoughts please?

Cheers,
Mrcool

navissar

No Data Contents is defined per-list (Which makes sense - if one list has no data, that doesn't mean the other will).

mrcool

#2
Thanks Nimrod..I agree with you but is there any way to restric to a page? I dont want the content to repeat on all the pages .my 2nd list is flowing into multiple pages and because of which 'No Data Contents' of 1st list is repeating.

navissar

Now I get it, and I think I have a solution.
Create a boolean variable using the expression PageNumber ()=1. Make that variable your No Data Content text item's render variable. The text item will only be rendered on the first page. I tested this on a little sample report and it seems to work.

mrcool

Once again Thanks Nimrod. This is helpful but the problem is I have 10-11 lists on the report.Anyone of the list may or may not have data.

Thanks

CognosPaul

So any one of those lists could appear on any page?

Try this. Put a new list into the No Data Contents. Put your text item in that list. Remove all of the list styles so it looks like normal text.

Lists don't repeat, so it should appear only once.

mrcool

Yes Paul any of those list can appear on any page depends on the data in each list.
I tried this option(planing list) but haven't succeeded. List header was repeating on every page and list body is appearing as there is no query item associated with it. I will associate a query item and hide the list column header and check how this works. Thanks paul for your valuable  suggession.

Cheers,
Mrcool

CognosPaul

Did you have any luck? I just tried it and it worked fine for me.

The report XML is below:
<report xmlns="http://developer.cognos.com/schemas/report/7.0/" useStyleVersion="10" expressionLocale="en-us">
<modelPath>/content/folder[@name=&apos;Samples&apos;]/folder[@name=&apos;Cubes&apos;]/package[@name=&apos;Sales and Marketing (cube)&apos;]/model[@name=&apos;2010-06-24T18:14:00.360Z&apos;]</modelPath>
<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" refQuery="Query1" name="List1">



<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="Year"/></dataSource></textItem></contents></listColumnTitle><listColumnBody><style><defaultStyles><defaultStyle refStyle="lc"/></defaultStyles></style><contents><textItem><dataSource><dataItemValue refDataItem="Year"/></dataSource></textItem></contents></listColumnBody></listColumn><listColumn><listColumnTitle><style><defaultStyles><defaultStyle refStyle="lt"/></defaultStyles></style><contents><textItem><dataSource><dataItemLabel refDataItem="Quarter"/></dataSource></textItem></contents></listColumnTitle><listColumnBody><style><defaultStyles><defaultStyle refStyle="lc"/></defaultStyles></style><contents><textItem><dataSource><dataItemValue refDataItem="Quarter"/></dataSource></textItem></contents></listColumnBody></listColumn></listColumns></list><list horizontalPagination="true" refQuery="Query2" name="List2">



<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="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></listColumns><noDataHandler><contents><list pageBreakText="false" name="List5" refQuery="Query5" showColumnTitles="hide">



<style>
<CSS value="border-collapse:collapse"/>

</style>
<listColumns><listColumn><listColumnTitle><style><defaultStyles><defaultStyle refStyle="lt"/></defaultStyles></style><contents><textItem><dataSource><staticValue>Text Item</staticValue></dataSource></textItem></contents></listColumnTitle><listColumnBody><style/><contents><textItem><dataSource><dataItemValue refDataItem="1"/></dataSource></textItem></contents></listColumnBody></listColumn></listColumns></list></contents></noDataHandler></list><list horizontalPagination="true" refQuery="Query4" name="List4">



<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="Region"/></dataSource></textItem></contents></listColumnTitle><listColumnBody><style><defaultStyles><defaultStyle refStyle="lc"/></defaultStyles></style><contents><textItem><dataSource><dataItemValue refDataItem="Region"/></dataSource></textItem></contents></listColumnBody></listColumn><listColumn><listColumnTitle><style><defaultStyles><defaultStyle refStyle="lt"/></defaultStyles></style><contents><textItem><dataSource><dataItemLabel refDataItem="Retailer country"/></dataSource></textItem></contents></listColumnTitle><listColumnBody><style><defaultStyles><defaultStyle refStyle="lc"/></defaultStyles></style><contents><textItem><dataSource><dataItemValue refDataItem="Retailer country"/></dataSource></textItem></contents></listColumnBody></listColumn></listColumns><noDataHandler><contents><list pageBreakText="false" name="List51" refQuery="Query5" showColumnTitles="hide">



<style>
<CSS value="border-collapse:collapse"/>

</style>
<listColumns><listColumn><listColumnTitle><style><defaultStyles><defaultStyle refStyle="lt"/></defaultStyles></style><contents><textItem><dataSource><staticValue>Text Item</staticValue></dataSource></textItem></contents></listColumnTitle><listColumnBody><style/><contents><textItem><dataSource><dataItemValue refDataItem="RegionError"/></dataSource></textItem></contents></listColumnBody></listColumn></listColumns></list></contents></noDataHandler></list><list horizontalPagination="true" refQuery="Query3" name="List3">



<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="Product brand"/></dataSource></textItem></contents></listColumnTitle><listColumnBody><style><defaultStyles><defaultStyle refStyle="lc"/></defaultStyles></style><contents><textItem><dataSource><dataItemValue refDataItem="Product brand"/></dataSource></textItem></contents></listColumnBody></listColumn><listColumn><listColumnTitle><style><defaultStyles><defaultStyle refStyle="lt"/></defaultStyles></style><contents><textItem><dataSource><dataItemLabel refDataItem="Product brand type"/></dataSource></textItem></contents></listColumnTitle><listColumnBody><style><defaultStyles><defaultStyle refStyle="lc"/></defaultStyles></style><contents><textItem><dataSource><dataItemValue refDataItem="Product brand type"/></dataSource></textItem></contents></listColumnBody></listColumn></listColumns></list></contents>
</pageBody>
</page>
</reportPages>
</layout>
</layouts>
<XMLAttributes><XMLAttribute output="no" name="RS_CreateExtendedDataItems" value="false"/><XMLAttribute output="no" name="listSeparator" value=","/></XMLAttributes><queries><query name="Query1"><source><model/></source><selection><dataItem aggregate="none" rollupAggregate="none" name="Year"><expression>[sales_and_marketing].[Time].[Time].[Year]</expression></dataItem><dataItem aggregate="none" rollupAggregate="none" name="Quarter"><expression>[sales_and_marketing].[Time].[Time].[Quarter]</expression></dataItem></selection></query><query name="Query2"><source><model/></source><selection><dataItem aggregate="none" rollupAggregate="none" name="Product line"><expression>filter([sales_and_marketing].[Products].[Products].[Product line],
#/*[sales_and_marketing].[Measures].[Quantity]&gt;1000000)*/#
[sales_and_marketing].[Measures].[Quantity]&gt;0)</expression></dataItem></selection></query><query name="Query3"><source><model/></source><selection><dataItem aggregate="none" rollupAggregate="none" name="Product brand"><expression>[sales_and_marketing].[Product brand].[Product brand].[Product brand]</expression></dataItem><dataItem aggregate="none" rollupAggregate="none" name="Product brand type"><expression>[sales_and_marketing].[Product brand].[Product brand].[Product brand type]</expression></dataItem></selection></query><query name="Query4"><source><model/></source><selection><dataItem aggregate="none" rollupAggregate="none" name="Region"><expression>filter([sales_and_marketing].[Retailers].[Retailers].[Region],
[sales_and_marketing].[Measures].[Unit price]&gt;10000000)
#/*[sales_and_marketing].[Measures].[Unit price]&gt;0)*/#</expression></dataItem><dataItem aggregate="none" rollupAggregate="none" name="Retailer country"><expression>[sales_and_marketing].[Retailers].[Retailers].[Retailer country]</expression></dataItem></selection></query><query name="Query5"><source><model/></source><selection><dataItem name="1"><expression>&apos;No ProductLine Data&apos;</expression></dataItem><dataItem name="RegionError"><expression>&apos;No Region Data Found&apos;</expression></dataItem></selection></query></queries></report>