February 1, 200719 yr Newbies I am trying to make a report that would print a certain amount of pages based on an entered number and also show the # of #. For example, if I enter a value of 4 in a field I would like to print out 4 pages and have each page show the # of # value (1 of 4, 2 of 4, 3 of 4, 4 of 4). Any help would be appreciated! Thanks!
February 3, 200719 yr Author Newbies I should probably clarify what I am trying to do here... I am trying to print box labels that will for example print box # of # on the label (box 1 of 3, 2 of 3, etc...) the number of boxes needed will come from a calculation (total pcs divided by how many pcs fit in a box) then I want to generate the amount of labels I need. Any help would be appreciated! Thanks
February 3, 200719 yr Hi there and welcome to the forums set up 2 global fields, box no and no of boxes. Your print script structure should then be something along these lines Set field No of boxes; (Ceiling(total pcs/no of pieces per box)+1) Set field box no; No of boxes Loop Do your print routine set field No of boxes;No of boxes-1 exit loop if No of boxes = 0 end loop This script will calculate the number of boxes that you need (the ceiling function+1 will account for any 1/2 empty boxes that are needed and count them as 1) and will print out as many sheets/lables as you need, allowing you to use the two fields on the printout HTH Phil
March 8, 200718 yr No worries, I sorted it. Include another global field called inv encl Set Field [box number; box total] Set Field [inv encl;""] (this clears any previous print of inv encl) Loop Print [Restore;No Dialog] Set Field [box total;box total-1] If [box total=1] Set Field [inv encl;"Inv Encl"] End If Exit Loop If [box total=0] End Loop
Create an account or sign in to comment