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

Display Starting 10 records in list report

Started by saumil287, 05 Dec 2011 10:43:15 PM

Previous topic - Next topic

saumil287

Hi all,
I have a list containing date column named PDC.

I want to display the 10 records order by date column in ascending order.

I tried using rank func but it displays the top 10 rows order by revenue col which I dont want.

Is there any way to display only the starting 10 latest records in a list report.
Like we do in a sql writing Top 10.
I also tried the same but giving an error.

thanks

Gyana.Sahoo

Hi,.
  use the Date dataitem in rank function. Rank(PDC)<=10. It will shows the latest top 10 date.

saumil287

Hi
Thanks for your reply
I want to display the 10 records order by date in ascending order.
Cant we restrict the no of rows like we do in sql server using Top 10
Thanks again.

Gyana.Sahoo

Hi,
Can you please brifely explain how exactly you want the output.

Revenue      Date
-----------      -------
1                 01-01-2010
2                 02-01-2010
.
.
.
x                xx-xx-xxxx


shricognos

data:
sno      Revenue        Date
-----     ------------   ---------------
   1         100            1-1-2011
   2          20             2-1-2011
   X           X              XXXXXXX
   X           X              XXXXXXX
   98      1000         29-1-2011
   99      150           30-1-2011
   100     200          31-1-2011

way1:   "rank([Date])<=10" (or) "rank([Date] DESC)<=10"
             then Last/Latest 10 records come. ( sno=91 to sno=100)
way2:   "rank([Date] ASC)<=10"
             then first 10 records come. ( sno=1 to sno=10)

HalfBloodPrince

Hi, you can use Rank function to restrict the no of rows.
For eg. to retrieve top five unit prices sort unit price column descending and use function as
rank([Unit sale price] at [Product name]) in a query calculation with name Top five
then go to Query tab in summary filters add filter as Top five < 5

This will provide you top five rows.
Hope this will help.

saumil287

Hi All,
Finally I got it.
Thank you very much.