Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Ranking in Crystal Reports 2008 Post Reply Post New Topic
Author Message
Bill13
Newbie
Newbie
Avatar

Joined: 11 Oct 2012
Online Status: Offline
Posts: 9
Quote Bill13 Replybullet Topic: Ranking in Crystal Reports 2008
     Posted: 15 Oct 2012 at 5:11am
Hi Experts,
 
I know there is no Rank function like Webi in crystal. So i am doing my ranking by sorting DESC on my sales revenue column and then showing top 40 by a running total field with Nth Largest properties along with for each record and on change of group. 
 
I have groups in my report on city and now i need to show a rank column which diplays 1 2 3 4 5....40 in a column for product.
 
Now to show this rank column i have used runningtotal field again and this time i have set it to count instead of Nth Largest , for each record and on change of group. It is not showing me correct ranking is there any other way to do this kind of thing ?
 
 
  Product      Rank   Sales Revenue
 
New York
 
  Product 1      1            100
  Product 2      2            101
  Product 3      3            102
 
Toronto
 
  Product1      1             100       (Instead of 1,2,3 in rank column i want 1,1
  Product2      2             100           and 1 becuase sales revenue is same)
  Product3      3             100
 
Dead
Bill
IP IP Logged
Sastry
Moderator
Moderator
Avatar

Joined: 16 Jul 2012
Online Status: Offline
Posts: 537
Quote Sastry Replybullet Posted: 15 Oct 2012 at 7:57pm
Hi
 
In your running total insert a condition like :
 
Whileprintingrecords;
numbervar x;
If previous({SalesRevenue}) = {SalesRevenue} Then
x;
else
x:=x+1;
 
Thanks,
Sastry
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum