Link to home
Start Free TrialLog in
Avatar of josslmpd
josslmpdFlag for United States of America

asked on

Choosing every Nth record to create a "random sample"

Is there a way to chose every Nth record in Crystal Reports?  I need to perform an audit where I need to generate a sample population from over 22,000 records.  I would like to create a formula  that only displays every 35th record in order to create a sample size of closer to 640.  I need a sample from all parts of the records, so the Nth percentile, or Nth smallest or largest wont work.  I have done similiar things in Excel, but I am asked to do this a lot and I would like to do it in Crystal with out exporting it.  Any help would be appreciated.  I am using Crystal Reports XI.
Avatar of vasto
vasto
Flag of United States of America image

Better do this on the database side. Then instead of 22000 records you will download just ~600. Your report will be 35 times faster. What is your database type?
Avatar of josslmpd

ASKER

It is a SQL server database.  I was hoping to do it in crystal since I am already running a selection fromula against the data to get it to the 22000 records.
Avatar of contactnaeem
contactnaeem

Best option to do this at database level but if your requirement is at report level then you can hide or show records based on evaluation formula. Have a look at below link

http://msdn.microsoft.com/en-us/library/ms225351(v=vs.80).aspx
SOLUTION
Avatar of peter57r
peter57r
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial