Question
Cognizant
IN
Last activity: 12 May 2023 11:32 EDT
Fetching the 3rd highest value from a 100 records.
I have a scenario like i have 100 records of employee and i want to fetch the 3rd highest salary of the employee.
How can we achieve this.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Updated: 12 May 2023 9:25 EDT
Bits in Glass
IN
@TanyaS58 no no, no need to loop dpage. Dpage is just a page to hold the data. RD will fetch the data. If you run the RD itself you will see the data in sorted manner.
Then if you run the dpage (sourced with this RD), you will see the same results on this dpage as dpage.pxresults(n)
Now as you want 3rd highest, instead of n, 3. That is dpage.pxresults (3).
Cognizant
IN
how to configure this by activity or by report definition?
Cognizant
IN
@Anoop Krishna could you please elaborate a bit,I am clear with the RD part but after fetching the salary by sorting how to loop in Dpage?
Accepted Solution
Updated: 12 May 2023 9:25 EDT
Bits in Glass
IN
@TanyaS58 no no, no need to loop dpage. Dpage is just a page to hold the data. RD will fetch the data. If you run the RD itself you will see the data in sorted manner.
Then if you run the dpage (sourced with this RD), you will see the same results on this dpage as dpage.pxresults(n)
Now as you want 3rd highest, instead of n, 3. That is dpage.pxresults (3).
Cognizant
IN
@Anoop Krishna Thanks for your explaination.
-
Anoop Krishna
Cognizant
IN
@Anoop Krishna just one small confirmation this dpage.pxResults (3) will be used in filter condn of RD right?
Bits in Glass
IN
@TanyaS58 no no, that is the data we are getting from the data from the data page. If you want 2nd data, dpage. pxresults (2), like that.
In RD you will be just sorting based on salary.
You will get the results in dpage and you are going to use that data wherever you need. You are just applying sorting in RD. Nothing else need to be done. Data will be in your dpage and you can get the whichever data you need.
-
Tanya Singh
TATA Consultancy Services
IN
@TanyaS58 Please try in report definition for Top rank option. Please refer the screen below.
-
Ramesh Reddy Battini