Click to See Complete Forum and Search --> : Creating a section based on number of sections per page.


DigitalDan3
December 28th, 2009, 01:40 PM
Please excuse me if I am not using the correct terminology as I do not author reports that often.

Our application needs to print substitute slips for people who filled in a position when the normal employee was absent. Each slip is per Substitute and the detail lists the date, the employee they substituted for and daily rate. Some of our clients print these out on perforated stock.

I would like to give the user the ability of to select number of slips per page.
With the following choices:

A: Continuous - start the next substitute's records right after the current one don't care about slips.

B: 1 Slip per page - Basically same as continuous except it starts each substitutes on a new page. If there are too may records for this substitute then continue on next slip.

C: 2 Slips per page - Repeat group info for each subsitute on each slip and each substitute is started on a new slip. If there is not enough room to fit all of the records print on the next slip.

D: 3 Slips per page ...

E: 4 Slips per page...

I also need to give the user the option to start a substitute on a new page. So that if we are printing 4 slips per page and the substitute only uses the first 2 slips, the next substitute is printed on a new page starting on slip 1. This will be enabled for option C,D&E

I also need the option to only print one substitution record per slip. This will be enabled for options B thru E.

I have no problem doing the continuous option. It is the slips per page thing that is throwing me.
Need to know where to even start this. Any help would be appreciated.
Thanks Dan

jade1977
December 29th, 2009, 08:07 AM
I think I have your answer.
Create a formula called record count.


whilereadingrecords;
numbervar recordCount;
if recordCount>={?How Many Records per page}then
recordCount:=1
else
recordCount:=recordCount+1



Now create a parameter that accepts a numeric value. Give the direction to enter a 0 for a continuous report.

In Section Expert, enter this code in the New Page After

{@Record (%7b@Record) Count}= {?How Many Records per page}


I believe that will give you the results you are looking for.