Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: 3 maximum records to be taken out Post Reply Post New Topic
Author Message
ankita
Newbie
Newbie


Joined: 13 May 2011
Online Status: Offline
Posts: 37
Quote ankita Replybullet Topic: 3 maximum records to be taken out
    Posted: 03 Jan 2013 at 4:23pm
HI please tell me how to get 3 maximum record printd from below data.


DSI_KEY_ID_     TA_PERIOD     MEMORYUTIL resultshuldb
1/1/2013          
2.00          
2.00     1/1/2013 12:00:00 AM     18.87        18.87      
2.00     1/1/2013 1:00:00 AM     17.67        18.65
2.00     1/1/2013 2:00:00 AM     17.68        18.51
2.00     1/1/2013 3:00:00 AM     17.82
2.00     1/1/2013 4:00:00 AM     17.90
2.00     1/1/2013 5:00:00 AM     18.01
2.00     1/1/2013 6:00:00 AM     18.10
2.00     1/1/2013 7:00:00 AM     18.16
2.00     1/1/2013 8:00:00 AM     17.39
2.00     1/1/2013 9:00:00 AM     17.51
2.00     1/1/2013 10:00:00 AM     17.64
2.00     1/1/2013 11:00:00 AM     17.73
2.00     1/1/2013 12:00:00 PM     17.78
2.00     1/1/2013 1:00:00 PM     17.88
2.00     1/1/2013 2:00:00 PM     18.04
2.00     1/1/2013 3:00:00 PM     17.66
2.00     1/1/2013 4:00:00 PM     17.48
2.00     1/1/2013 5:00:00 PM     17.57
2.00     1/1/2013 6:00:00 PM     17.65
2.00     1/1/2013 7:00:00 PM     17.73
2.00     1/1/2013 8:00:00 PM     18.00
2.00     1/1/2013 9:00:00 PM     17.94
2.00     1/1/2013 10:00:00 PM     18.51
2.00     1/1/2013 11:00:00 PM     18.65
Group2          
3.00     1/1/2013 12:00:00 AM     19.06
3.00     1/1/2013 1:00:00 AM     19.02
3.00     1/1/2013 2:00:00 AM     19.04
3.00     1/1/2013 3:00:00 AM     19.04
3.00     1/1/2013 4:00:00 AM     19.06
3.00     1/1/2013 5:00:00 AM     19.07
3.00     1/1/2013 6:00:00 AM     19.08
3.00     1/1/2013 7:00:00 AM     19.08
3.00     1/1/2013 8:00:00 AM     19.14
3.00     1/1/2013 9:00:00 AM     19.16
3.00     1/1/2013 10:00:00 AM     19.18
3.00     1/1/2013 11:00:00 AM     19.18
3.00     1/1/2013 12:00:00 PM     19.16
3.00     1/1/2013 1:00:00 PM     19.16
3.00     1/1/2013 2:00:00 PM     19.18
3.00     1/1/2013 3:00:00 PM     19.22
3.00     1/1/2013 4:00:00 PM     19.28
3.00     1/1/2013 5:00:00 PM     19.36
3.00     1/1/2013 6:00:00 PM     19.35
3.00     1/1/2013 7:00:00 PM     19.37
3.00     1/1/2013 8:00:00 PM     19.38
3.00     1/1/2013 9:00:00 PM     19.45
3.00     1/1/2013 10:00:00 PM     19.48
3.00     1/1/2013 11:00:00 PM     19.50
Gropu3          
4.00     1/1/2013 12:00:00 AM     42.59
4.00     1/1/2013 1:00:00 AM     43.42
4.00     1/1/2013 2:00:00 AM     43.61
4.00     1/1/2013 3:00:00 AM     43.72
4.00     1/1/2013 4:00:00 AM     43.82
4.00     1/1/2013 5:00:00 AM     44.29
4.00     1/1/2013 6:00:00 AM     46.00
4.00     1/1/2013 7:00:00 AM     48.57
4.00     1/1/2013 8:00:00 AM     51.02
4.00     1/1/2013 9:00:00 AM     53.03
4.00     1/1/2013 10:00:00 AM     55.21
4.00     1/1/2013 11:00:00 AM     57.18
4.00     1/1/2013 12:00:00 PM     28.60
4.00     1/1/2013 1:00:00 PM     26.90
4.00     1/1/2013 2:00:00 PM     41.08
4.00     1/1/2013 3:00:00 PM     50.91
4.00     1/1/2013 4:00:00 PM     52.86
4.00     1/1/2013 5:00:00 PM     54.24
4.00     1/1/2013 6:00:00 PM     52.05
4.00     1/1/2013 7:00:00 PM     54.73
4.00     1/1/2013 8:00:00 PM     55.82
4.00     1/1/2013 9:00:00 PM     56.12
4.00     1/1/2013 10:00:00 PM     56.09
4.00     1/1/2013 11:00:00 PM     55.99
IP IP Logged
Sastry
Moderator
Moderator
Avatar

Joined: 16 Jul 2012
Online Status: Offline
Posts: 537
Quote Sastry Replybullet Posted: 07 Jan 2013 at 1:27am
Hi

Go in Report Menu--Record Sort Expert and add Memoryutil and set the order to descending.

Now create a formula like

@init
Whileprintingrecords;
Numbervar x:=0;
//Place this on your group header

@acc
Whileprintingrecords;
Numbervar x:=x+1;

//Place this on your detail section i.e. where you have detail records

Now go in Section Expert and select the detail section or the section where you have detail information and give the following condition

Whileprintingrecords;
Numbervar x;
if x> 3 then true else false




Thanks,
Sastry
IP IP Logged
ankita
Newbie
Newbie


Joined: 13 May 2011
Online Status: Offline
Posts: 37
Quote ankita Replybullet Posted: 07 Jan 2013 at 4:57am
i am getting errror remainig text doesnot appear to be part of the formula..........pls help....how to place it in the group header formula section pls tell
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.031 seconds.