Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Restrict Results by Number Post Reply Post New Topic
Author Message
mikebird
Groupie
Groupie
Avatar

Joined: 04 Mar 2008
Location: United Kingdom
Online Status: Offline
Posts: 70
Quote mikebird Replybullet Topic: Restrict Results by Number
     Posted: 30 Jun 2008 at 6:12am
So simple. Not sure how. As with a top 100 clause in a SQL query, how do you do this in a report, when ordered how you want it?
 
Only want to see 10 rows. Not grouping. Just top 10
 
Thanks
Mike
Life = luck (+/-) and effort (+/-). If you have no luck & make no effort, then you are dead
IP IP Logged
venkatesha
Newbie
Newbie


Joined: 29 Jun 2008
Online Status: Offline
Posts: 35
Quote venkatesha Replybullet Posted: 01 Jul 2008 at 4:28am
In the Section Expert of the Detail Section in
   
    Suppress (No Drill-Down) place this formula

    RecordNumber >10

Which will display only 10 rows.
IP IP Logged
mikebird
Groupie
Groupie
Avatar

Joined: 04 Mar 2008
Location: United Kingdom
Online Status: Offline
Posts: 70
Quote mikebird Replybullet Posted: 02 Jul 2008 at 12:47pm

Thanks very much for that. It's doing exactly what I wanted. I knew there were formulae for that, but not sure what recordnumber was.

I've got to ask though - it does what you say: recordnumber > 10 gives just 10 rows. I thought recordnumber > 10 would give any count of rows as long as it was more than 10

That seems funny though. I'd expect to set recordnumber <= 10 to get 10 rows

Will you explain why it's like that? I like to understand.

Thanks
Mike
Life = luck (+/-) and effort (+/-). If you have no luck & make no effort, then you are dead
IP IP Logged
mikebird
Groupie
Groupie
Avatar

Joined: 04 Mar 2008
Location: United Kingdom
Online Status: Offline
Posts: 70
Quote mikebird Replybullet Posted: 04 Jul 2008 at 1:58am
Also, to add to this function, how to I get the number of rows (5) to be specific by chunks of value? Need currency value to be in steps of money - 10,000, 20,000, 30,000, 40,000, 50,000?
Life = luck (+/-) and effort (+/-). If you have no luck & make no effort, then you are dead
IP IP Logged
mikebird
Groupie
Groupie
Avatar

Joined: 04 Mar 2008
Location: United Kingdom
Online Status: Offline
Posts: 70
Quote mikebird Replybullet Posted: 04 Jul 2008 at 4:14am

Also need to set a cutoff. Having a top currency value for a group, I need to set a lower boundary and I reckon this will be set in a section formula too. So listing rows ordering descending monetry value, How to I set no upper bound but cut off these rows at 200,000 and show nothing below that for particular groups (in specified order..)

 

Thanks!

Life = luck (+/-) and effort (+/-). If you have no luck & make no effort, then you are dead
IP IP Logged
sjr40
Newbie
Newbie


Joined: 09 Jun 2008
Online Status: Offline
Posts: 7
Quote sjr40 Replybullet Posted: 07 Jul 2008 at 3:10am
The formula works by Suppression of all records above the count of ten.
That's why it is put in there.
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