Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Have How many way to do sorting for crystal report Post Reply Post New Topic
Author Message
angelyin1984
Newbie
Newbie
Avatar

Joined: 08 May 2009
Location: Malaysia
Online Status: Offline
Posts: 30
Quote angelyin1984 Replybullet Topic: Have How many way to do sorting for crystal report
     Posted: 14 May 2009 at 2:00am
hihi......can somebody give some guide to do sorting in crystal report XI.
 
when i sorting my report to top 20 record, but the others record still will be there.


Edited by angelyin1984 - 14 May 2009 at 2:04am
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 14 May 2009 at 6:24am
if you only want 20 records, you either need to suppress them, filter them out, or not get them in the first place.
 
suppression would be on the row via some condition (already printed 20).
filtering would be the recordset and via some condition (who knows)
not getting them would be using a stored proc that only returns the data that you want, and not the 'other' records.
 
for most, the first option is the easiest.  create a formula with a shared variable to count each row of displayed data, put the formula in that row or in a duplicate section row above the one to display (details a for the formula and details b for the actual data, suppress details a).  in the row of the data go to the section expert and add a formula to suppress if the shared variable is >20.  in the group header (if there is one) put a formula that resets the shared variable back to 0.
 
voila only 20 records per section. 
 
NOTE: if aggregate functions are to be used, you will need to create formulas to handle them as running totals will include the suppressed data as will other aggregate functions in Crystal
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