Hi gurus,
i try to show only the first row of a list but it dosn't work.
i defined a variable (bool) with this content:
RowNumber()>1
then i marked the hole list an add the variable to the list.
can somebody explain me why it not works?
THX
i dont clearly understand what u have done but i tried something similar to what u said and it worked for me. This is what i did...
1. Create boolean variable with RowNumber() > 1
2. Select List Columns Body Style and then add this boolean variable as the Style variable.
3. For "Yes" value of the variable set the "Box Type" for List Columns Body Style to None
Another method i used to get this to work:
1. Create two data items - Data item1, Row Number
2. Data item1: have the expression as 1
3. Row Number: have the expression as running-total(Data item1)
4. The aggregate functions of both these data items should be None
5. Add a filter to the query as Row Number = 1
If you have cognos 8.3
then in that in Report Studio there is an object called as Singleton .
The singleton object retrieves only the first row value for that query
hope it will help u ....
vij
:)
thanks for your reply,
but iam using cognos 8.2
In the Query that you have hooked up to the list box you should be able to set the max rows retrieved set it to 1. This might do what you need.
sounds good. ;D
i will test it.
Manchmal sieht man den Wald vor lauter Bäumen nicht
okay now i testet it and it works perfect.
thx
Quote from: bwingate on 26 Feb 2009 09:08:00 AM
In the Query that you have hooked up to the list box you should be able to set the max rows retrieved set it to 1. This might do what you need.
hi my database is returning more number of rows(say 700 rows) but i want to limit to only 5 rows
read the post from bwingate
in your case set it to 5
What if you only want to display the LAST row in a list report? I'm using 8.3 and have the average daily balances for each day of the month, but only need the final average. I don't want to actually display the average daily balance for each day in the month, just the final day.
Sorry to be confusing...
PS...I tried using a singleton, but as stated above, it gives me the first row...
Quote from: kristielee on 05 Aug 2009 04:15:56 PM
What if you only want to display the LAST row in a list report? I'm using 8.3 and have the average daily balances for each day of the month, but only need the final average. I don't want to actually display the average daily balance for each day in the month, just the final day.
Sorry to be confusing...
PS...I tried using a singleton, but as stated above, it gives me the first row...
Sort your query descending, this way your last row will become your first row...