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

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

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

Row Count in Rerportnet

Status
Not open for further replies.

damzi

Programmer
May 3, 2004
66
0
0
US
Hi guys - now this looks tricky to me. Am trying to get the row count of my list report and insert that into the page header of my report. Could anyone help me with this. Am working in Report Studio in Reportnet. Thanks so much. - Damini
 
Hi Damzi,

this would do the trick:

Add a calculation column to your list and add 1 in the expression editor! Sum the column and add a new list to your page header, which should base on your first (and only) query!
Add the calculation item to your new list, choose type of box none and as content value instead of label!

Here an sample for the gosales package:

<report xml:lang="en" xmlns=" <modelConnection name="/content/package[@name='gosales']/model[@name='2003-10-10T18:35:40.529Z']"/>
<querySet xml:lang="en">
<BIQuery name="Query1">
<cube><factList><item refItem="COUNTRY_CODE" aggregate="none"/><item refItem="Count" aggregate="total" isHeader="true"/></factList></cube>
<tabularModel><dataItem name="COUNTRY_CODE" aggregate="none"><expression>[GOSALES].[COUNTRY].[COUNTRY_CODE]</expression></dataItem><dataItem name="Count"><expression>1</expression></dataItem></tabularModel></BIQuery>
</querySet>
<layoutList>
<layout>

<pageSet>

<page name="Page1">
<pageBody>
<list refQuery="Query1">
<listColumnTitles><listColumnTitle><textItem><queryItemRef refItem="Count" content="label"/></textItem></listColumnTitle><listColumnTitle><textItem><queryItemRef refItem="COUNTRY_CODE" content="label"/></textItem></listColumnTitle></listColumnTitles>
<listColumns><listColumn><textItem><queryItemRef refItem="Count"/></textItem><style><CSS value="text-align:right"/></style></listColumn><listColumn><textItem><queryItemRef refItem="COUNTRY_CODE"/></textItem></listColumn></listColumns>
<style>
<CSS value="border-collapse:collapse"/>
</style>
<overallFooter><rowCells><rowCell class="inlineSummary"><style><CSS value="text-align:right"/></style></rowCell><rowCell class="inlineFooter"/></rowCells></overallFooter><listHeader><rowCells><rowCell colSpan="2"><textItem><queryItemRef refItem="Count"/></textItem></rowCell></rowCells></listHeader><XMLAttribute name="RS_ListGroupInfo" value=""/></list>
</pageBody>
<pageHeader>
<list refQuery="Query1">
<listColumnTitles><listColumnTitle><textItem><queryItemRef refItem="Count"/></textItem><style><CSS value="background-color:white"/></style></listColumnTitle></listColumnTitles>
<listColumns><listColumn><textItem><queryItemRef refItem="Count"/></textItem><style><CSS value="display:none"/></style></listColumn></listColumns>
<style>
<CSS value="border-collapse:collapse"/>
</style>
<XMLAttribute name="RS_ListGroupInfo" value=""/></list>
<block class="reportTitle">
<textItem class="reportTitleText">
<text>RowCount</text>
</textItem>
</block>
<style>
<CSS value="padding-bottom:10px"/>
</style>
</pageHeader>
<pageFooter>
<table>
<tableRow>
<tableCell>
<textItem>
<expression>AsOfDate()</expression>
</textItem>
<style>
<CSS value="vertical-align:top;text-align:left;width:25%"/>
</style>
</tableCell>
<tableCell>
<textItem>
<text>- </text>
</textItem>
<textItem>
<expression>PageNumber()</expression>
</textItem>
<textItem>
<text> -</text>
</textItem>
<style>
<CSS value="vertical-align:top;text-align:center;width:50%"/>
</style>
</tableCell>
<tableCell>
<textItem>
<expression>AsOfTime()</expression>
</textItem>
<style>
<CSS value="vertical-align:top;text-align:right;width:25%"/>
</style>
</tableCell>
</tableRow>
<style>
<CSS value="border-collapse:collapse;width:100%"/>
</style>
</table>
<style>
<CSS value="padding-top:10px"/>
</style>
</pageFooter>
</page></pageSet></layout>
</layoutList>
</report>


Hope this helps,
Jochen
 
Thanks Jochen, this was useful - am now trying to get a solution to counting the number of 'Y' in a column with boolean values. I have abt 4 of cols in my table with such values, and have to find the count of 'Y'-s only in e4ach of the cols. Would really help if you cld help me with this. - thanks again ! - d
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top