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

 

Row Numbers in List Reports in BIA

Started by tjohnson3050, 18 Apr 2013 11:21:38 AM

Previous topic - Next topic

tjohnson3050

Background:

Query Studio has an easy feature to add row numbers to list reports.  This feature is not available in Business Insight Advanced.

Since BIA uses the same report definition as Report Studio, we can take advantage of the clipboard fragment feature to overcome some of the limitations of BIA.

Work Around:

Assuming you start with a list report you have created in BIA, you can add row numbers by copying and pasting the following code fragment:

<RSClipboardFragment version="2.0"><listColumn><listColumnBody><style><defaultStyles><defaultStyle refStyle="lc"/></defaultStyles><CSS value="text-align:right;;white-space:nowrap"/></style><XMLAttributes><XMLAttribute name="qsc" value="lc" output="HTML"/><XMLAttribute name="tag" value="C1"/></XMLAttributes><contents><textItem><dataSource><reportExpression>RowNumber()</reportExpression></dataSource></textItem></contents></listColumnBody><listColumnTitle><style><defaultStyles><defaultStyle refStyle="lt"/></defaultStyles></style><XMLAttributes><XMLAttribute name="qsc" value="lt" output="HTML"/><XMLAttribute name="tag" value="C1"/></XMLAttributes><contents><textItem><dataSource><staticValue>Row</staticValue></dataSource></textItem></contents></listColumnTitle></listColumn></RSClipboardFragment>

1.   Select the text in bold above and copy (to windows clipboard)


2.   From BIA, switch to Page Design view, select the the first column header in the list report and choose Edit – Paste To – then Insert Before and click ok.

Lynn


pumccg

You can also add a query calculation to your list report and use the running-count() function. This function doesn't appear in the list of available functions but if you type it into your query calculation and use it to get a running count of one of the data items in your list report it will give you row numbers.

NB: in BIA/CWA Cognos don't make too many of the usual Report Studio functions available, but it you type them into a query calculation they may work!