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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Easytrieve tally and breaking help!

Status
Not open for further replies.

Dolphinn

Programmer
Apr 16, 2001
1
US
I am trying to get this program to break whenever the TALLY on a field reaches a certain number (100,000). Is there a way to do this?

To give some background, I work at a company where several people's work needs to be divided up by the amount of items received. In order to keep things fair, their ranges need to be altered every so often so they all have the same amount of items.

Thanks for any help anyone can provide on this!
 
It sounds like you want to have a fake control break every N rows.

Try this:
Add a work field. DUMMY-CONTROL W 10 P 0
Guess a breakdown, say 10,000 rows and you want 5 control breaks.

JOB INPUT INFILE
CASE INFILE:RECORD-COUNT
WHEN 1 THRU 10000
DUMMY-CONTROL = 1
WHEN 10001 THRU 20000
DUMMY-CONTROL = 2
etc.

PRINT REPORTNAME

REPORT REPORTNAME
* DO NOT CODE SEQUENCE, USE SORT BEFORE THE JOB
CONTROL FINAL DUMMY-CONTROL NEW-PAGE other-sort fields
TITLE 1 'regular title' +40 DUMMY-CONTROL
LINE other-data
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top