×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

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

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

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

(OP)
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

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

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

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

(OP)
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

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

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close