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

Returning A Certain Number Of Records To A Report

Started by TCM, 30 Apr 2007 03:33:40 PM

Previous topic - Next topic

TCM

I would like create a report that only pulls back a certain number of records, for example I would like to pull back 5 accounts that have a reportfield of 61. I used a filter like the one below, which passes validation but doesn't return any data even though it really should. Any suggestions on how to do this?

running-count ([CUSTOMERNUMBER])<6 and [Gas].[CIMASTERREPORTCODE].[REPORTFIELD]=61

COGNOiSe administrator

Use rank([CUSTOMERNUMBER]) instead. Also, those two filters should be separate, 61 on detail and 6 on summary.

TCM

I received the data I was looking for after breaking out the filters and using running-count. Using rank gave me the same results. Is there a way for me to pick up different account numbers each time the report is ran though? If I run this report everyday, I get the same accounts numbers every day. Is there a way to pick random records?

COGNOiSe administrator

The trick would be to create a calculated column using database side random() function and then putting rank() on it. If you don't have a random function in FM and RS, you can always add it (check the documentation for step-by-step instructions).