View Full Version : Print No of Pages according to field


SteveE
09-14-2007, 04:03 AM
I have a Report which I use as labels, each unit needs its own label there can be 1 to 26 or more units in total.
Could anyone offer advise how I can make the correct number of prints according a [qty] on the query/report i.e. No.of units =[10] (10 labels required) Each label whould then have its print number, 1 of 10, 2 of 10 etc. I want the operator only to have to click print and the correct number of lables to automatically be issued.

I know I need some kind of loop but am not sure how to go about it, or where it should be entered.
Any help appricated

thanks in advance
Steve

Pat Hartman
09-18-2007, 07:33 PM
There is actually a simple way to do this. Create a table with as many rows as the maximum number of labels you'd ever need. It only needs a single field with a numeric value ranging from 1 to whatever. In your query to print labels join to this table on the count field. Switch the query into SQL view (where it will remain forever since QBE view cannot display anything but equi-joins). Change the join from = to <=. That will join the reporting record to n records in the number list table which will essentially duplicate the record so that you can print the proper number of labels. There is an article in the KB that describes this method in more detail if you can't work it out from my description - sorry I don't have the link.

SteveE
09-19-2007, 01:13 AM
Many thanks for your reply, I think I have the idea and will have a go.

thanks again
Steve