Reputation: 3
How to get Maximum 3 value in Crystal Report.
This is my Result
But my requirement is
Upvotes: 0
Views: 1337
Reputation: 174
You can use the built- in Crystal Reports.
Another way is to use the NthLargest function inside formula editor:
NthLargest (1, {SalesOrderHeader.SubTotal}) + NthLargest (2, {SalesOrderHeader.SubTotal}) + NthLargest (3, {SalesOrderHeader.SubTotal})
Upvotes: 1
Reputation: 26262
Create a SQL Expression (SEQ_INV
):
(
row_number() OVER (ORDER BY OrderNo DESC)
)
Add this text to the record-selection formula:
{%SEQ_INV}<4
Upvotes: 0