Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: to get TOP N records Post Reply Post New Topic
Author Message
achandana01
Groupie
Groupie
Avatar

Joined: 20 Jul 2011
Online Status: Offline
Posts: 59
Quote achandana01 Replybullet Topic: to get TOP N records
    Posted: 25 Apr 2013 at 10:27am
Hi,

I am looking for top N rows in a report for that I go to report > group Sort expert

I selected the Top N from the drop down and put a parameter in the formula which allows me to select any number of top rows, however I am looking for something like this the parameters should allows me to select particular number of top procedures or all procedures I am wondering how to do code it in my report ? Please help.

Thanks,

chand
IP IP Logged
Sastry
Moderator
Moderator
Avatar

Joined: 16 Jul 2012
Online Status: Offline
Posts: 537
Quote Sastry Replybullet Posted: 25 Apr 2013 at 11:38pm
Hi

What is

"select particular number of top procedures or all procedures I am wondering how to do code it in my report ? "

You mean.. stored procedurs if so, how can we say top procedures ?

If not stored procedurs then what is this give some example to understand better
Thanks,
Sastry
IP IP Logged
achandana01
Groupie
Groupie
Avatar

Joined: 20 Jul 2011
Online Status: Offline
Posts: 59
Quote achandana01 Replybullet Posted: 26 Apr 2013 at 6:02am
Hello Sastry,

Procedures isn't really stored procedures it is a field in a table which I am using to group by in my report.

I would like like to setup a parameter which gives an option to select Top N or All(all records for that query irrespective of top rows).I know how to setup TOP N but not sure how to pass ALL.

Sorry about the earlier confusion, I hope this explains better.

Thanks,
chand
IP IP Logged
Sastry
Moderator
Moderator
Avatar

Joined: 16 Jul 2012
Online Status: Offline
Posts: 537
Quote Sastry Replybullet Posted: 29 Apr 2013 at 4:50am
Hi

There is only one way to do this is :

Create a static string type parameter, and in Top N condition evaluate it like ..

If isnumeric({Parameter}) Then
Tonumber({Parameter})
else
500000 // This is maximum values. If any user enters other than number 'All' or any other value then it will take 500000 number inplace of 'N'
Thanks,
Sastry
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.012 seconds.