Printing to Labels?

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
novarcproducts
Posts: 13
Joined: Fri Oct 05, 2007 12:45 am

Printing to Labels?

Post by novarcproducts » Sat Oct 06, 2007 2:04 am

Hi all,

i'm a newbie to Revolution Studio (just the trial version so far but am leaning toward full purchase) so this is probably going to be the first of many questions to come. But here goes. Is there a way to print the contents of a particular field to a sheet of 2.0 x 4.0 inch labels? Having the contents of the chosen field printed to each of the 10 labels on the label sheet? I was able to do this very easily in Hypercard with the reports template it provided but I see no template for labels here in Rev Studio and I really don't want to purchase the Reports add on just to do this one requirement. Anyone have any ideas how I can do this?

thank you,

Ron

Lynn P.
Posts: 79
Joined: Sun Apr 09, 2006 1:09 pm

Post by Lynn P. » Sat Oct 06, 2007 10:13 am

Hi Ron ~

There are no built-in label templates in Rev, so you have to program your own in Rev. :(

I'm right in the middle of doing this myself actually, because I don't like any of the apps out on the market for creating labels and I only use a couple of sizes anyway. I'm incorporating them into a specialized app that automatically transfers chosen data to the label(s), then prints it.

I suppose there may be several ways to go about it, but I'm just basically setting up a card (the size of a sheet of labels) in a stack with fields of the label size I want (one card per label size) and transferring my data into either all fields (if I need multiple labels of the same thing) or into any particular field if I need to only print one of something.

novarcproducts
Posts: 13
Joined: Fri Oct 05, 2007 12:45 am

Printing Labels

Post by novarcproducts » Sat Oct 06, 2007 8:56 pm

Hi Lynn,

Thank you for the reply. I finally just ended up making my stack the size of a label sheet and making the second card of the stack be my "Template" for the labels with 10 fields that when the card is printed it prints my labels nicely. Only problem is though my cards being such a large size to accomodate the printing leaves a lot of wasted space on my first card. The card where the buttons that control what text to put into the labels template are. If I reduce the stack size and try to print my template card, only what is visible on the screen gets printed.

Ron

Lynn P.
Posts: 79
Joined: Sun Apr 09, 2006 1:09 pm

Post by Lynn P. » Sat Oct 06, 2007 9:43 pm

Hi again Ron ~
You can change the size of each card before you go there and again when you travel back to the originating card to avoid that.
To see this... create a new stack with 2 cards.
On the first card, add a button and put the following script in it:

Code: Select all

on mouseUp
  set the lockscreen to true
  set the width of this stack to 895
  set the height of this stack to 895
  go to cd 2
  set the lockscreen to false
  wait 5 seconds
  set the lockscreen to true
  set the width of this stack to 400
  set the height of this stack to 400
  go to cd 1
  set the lockscreen to false
end mouseUp
If you want it all behind the scenes & to print automatically... use the "go invisble" instead:

Code: Select all

go invisible to card "MyLabels" of stack "Reports" 
printMyLabels --handler in card to do the actual printing
Because I use a lot of various types of print templates, I put all my print templates in a separate stack so I can include my "print stack" in any application I create. I just make it a substack of any main stack I create. I use labels, invoice and statement templates a lot.

Hope that helps with resizing issue. :)

novarcproducts
Posts: 13
Joined: Fri Oct 05, 2007 12:45 am

Thanks!

Post by novarcproducts » Sat Oct 06, 2007 11:10 pm

Lynn,

Thank you very much for the tip! Works Great!
:D
Ron

Post Reply