0 Replies Latest reply: Aug 18, 2012 7:02 PM by Micah Young RSS

print decrementing pages based on field value

Micah Young
Currently Being Moderated

I have a spreadsheet as a datasource with about 40 records.... I need to print multiple pages for each record based on the value of one of the columns ('bundles') for each record. For example, if the starting value for the 'bundles' column is 20, I need it to print 20 individual pages.... I have each differentiated record designated as a new group based on it's attribute 'route'. For example, where column route has the value 'north' and 'bundles' is 10, I need 10 pages to print where the route is 'north'.....

 

I have tried a few things, but haven't been able to get it to actually create multiple pages for a record.  What logic do I need to use to get it to actually display a decrementing value and returns a page in each instance until the value reaches 0? Where should I place the formula?

 

I have tried declaring a local variable and using whileprintingrecords, but I haven't used it much and am probably missing something. I have tried moving my formula around (in details, group header, etc), but I can't get it to do much more than confirm that the variables value is greater than zero ('true') and print it on a single page for the route....

 

 

Here is the most recent code for an idea of where I'm hanging up:

 

Dim bnd

bnd = {Sheet1_.F8}

Do While bnd > 0

    if bnd = 1 then Exit Do

    bnd = bnd - 1

Loop

formula = bnd

 

the variable 'bnd' is referencing the cell (Sheet1_.F8) that supplies the starting value that designates the number of pages I need to print.....

 

Thanks in advance for a kick in the right direction....

Actions