Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

n of n Pages Based on Value


This topic is 6461 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

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!

  • Newbies
Posted

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

Posted

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

  • 1 month later...
Posted

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

This topic is 6461 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.