Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

need an advise on how to print on labels like "label 1 of 2" 1

Status
Not open for further replies.
Jan 20, 2007
237
US
Hi Everyone,
i am printing labels on a"smart label printer 620" from my application a vfp 9.0 sp2.

i have a spinner in the form that if i want to print more than one label of the same label, i just increase from the default value=1 to 2, then i would like to get at the bottom of the label something like this "Label 1 of 2" printed, i put it in the page footer but it does not print,(the label got printed) but no what i have in the Iif() i also added it in the detail band, does not print either.

in the picture below you won't see the Iif()as i removed, can anyone guide me how to accomplish it ?

Code:
Iif(thisform.spinner1.value>1, "Label "+ trans(_pageno)+ 'of '+ trans(_pagetotal), " ")
here is a picture of the label lbx

Thanks a lot in advance

 
 https://files.engineering.com/getfile.aspx?folder=6cd53eca-1567-495f-816f-e00fb190c040&file=labellbx.PNG
I don't think the label sees the spinner.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
No, that won't work. You can't reference your spinner from within the label. Also, the page footer applies to the entire page, not the individual label.

A better approach would be to generate a second copy of the record within your underlying cursor. So if the user wants two labels, simply ensure there are two copies of the record in the cursor. And put the "M on N" message in the cursor itself, as a field (leaving it blank when you only want one label). Finally, include that message in the body of the label, not in the page (or column) footer.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Hi Guys,
i am able to print as many labels as the number i selected from the spinner, in other words if i want to print the same label 3 times, then i select from the spinner a number 3, what i am not able is to print in each label is "LABEL 1 OF 3"
on the second label "LABEL 2 OF 3 " and LABEL 3 OF 3" in the last label
sorry Mike, i don't get what you meant
Thanks
 
Ernesto, my suggestion was that the cursor (the one that drives the labels) contains one record for each copy of the label that you want to print). So if you want to print three labels for Client 1, and one for Client 2 and three for Client 3, the cursor will contain seven records. The first three records will contain the address for Client 1, and so on.

You also add a new field to the cursor. In the first label for Client 1, that field contains the text, "Label 1 of 3"; in the second record for Client 1, it contains "Label 2 of 3", and so on. For Client 2, that field would be blank.

Now, add that field to the label, directly below whatever other data you are printing. Not in the page footer or the column footer, but right there in the detail band.

That's all there is to it. Try it, and you will see what I mean.

Mike



__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top