Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to print every 10th record

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I am writing a report that will need to print only the 1st detail record and then every 10th record after that. Therefore, the report will only show records #1, #10, #20, #30, etc. Thereby, giving a sampling of the data and not a true detail report which would, of course, print all records meeting the selection criteria. This is to be a 10% sampling report of the data. If anyone has any ideas on how to go about doing this, please respond. Thank you very much!!!
 
To be precise, if you want a 10% sample then you want records 1,11,21,31 etc. The first in each group of 10. Here's how:

Go "Format Section", highlight the details section and click the formula button next to the suppress property. Now enter the following formula:

Remainder(RecordNumber,10) <> 1


Or if you want records 10, 20, 30, 40 (the last in each group of 10) use:

Remainder(RecordNumber,10) <> 0


Keep in mind that this sample is not really a random sample unless you randomly order the records. One rough way to do this is to sort the records on a junk field that randomizes the records. I usually sort the records based on a nonsense formula (like lettrs 2, 5 and 7 of a person's first name. That pretty much puts them in random order. [sig]<p>Ken Hamady- href= Reports Training by Ken Hamady</a><br>[/sig]
 
Thank you very much for your response!!!! That was exactly what I was needing to know. Thank you for your time. I was able to achieve the results that were needed for the report due to your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top