Jump to content

Simple Way to Print Multi LABELS from ONE RECORD??


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

Recommended Posts

Hello all!

I am really interested in some help as to all of your ideas as to the simplest way to script to make filemaker print multiple labels of the same record!

I have looked around the forum and there are some super confusing ways...Just wondering if someone has come up with a great easy script??

I have a system for my store and I need to make multiple labels of the same record..basically a page of labels from one record..why is this so difficult for filemaker to do??

Thanks for all of your help!!

Ami

Link to comment
Share on other sites

Ami, Just set up a layout for one label. Then replicate that for a whole page. i.e. you will have each field in many places on the page.

Dan, DO NOT DO IT. I used to use partial sheets, until the first time I had a label come off inside my printer. Never again!

Link to comment
Share on other sites

Ami, I just remembered one way that I did this that might be an alternative to Paul's suggestion. Just create global field that mirror each field that you want to print (using a set field script step) and set up your layout using the global fields.

Paul, you may be right, but I know some cheap customers are going to demand it anyway.

Anyone have thoughts on how to do this?

Dan

Link to comment
Share on other sites

I know, I know! Don't print partial labels. I've read that for 25+ years and I've printed and reprinted (many times) from the same labels regularly every chance I get - which has been thousands of times (easily). I've NEVER had one come off in the printer (except for dot matrix because their platens are too small and round and allows too much bend) and I've used just about every printer imaginable. smile.gif

I think Label Manufacturers pay Printer Manufacturers to say that. The real world dictates that we, many times, need ONE file folder label or ONE notebook cover label, etc. It's ridiculous to not re-use, in my opinion. You could pay for a new HP printer in six months on the wasted money if you didn't re-use those labels.

With the cost of these labels, I refuse to stop until Avery and the others figure out how to allow full-sheet use (possibly by allowing placement of one or more labels on a 'feeder sheet' or something. I do however, take great care of my labels - insisting they be placed back within their box and not tossed around. And if they are wrinkled or show a bent edge or raised label at all, I'll use them for other things. Otherwise, I say, "Go for it." smile.gif

LaRetta

Link to comment
Share on other sites

OK, cool. I'm with you, LaRetta. But I still can't get my head around a way to do it.

It seems like I need some way to create 1 to 29 empty records to use to fill up the sheet (assuming 30 label sheets) and put these at the front of the found set, and then delete them when the print job is over.

Maybe create n records with some really weird value for one of the fields that won't be printing (calculated somehow from the user's name to prevent conflicts in multi-user settings). Perform a find on this weird value using the expand found set option and sort these to the front of the found set. Print the set, then find again for the weird value and delete those records.

Well, its a thought. I'm going to have a beer and go to bed. I work too much.

Thanks,

Dan

Link to comment
Share on other sites

Hi Dan,

I've seen (and tried) several solutions for FileMaker but haven't seen the ideal solution yet (but maybe I've just missed it). It would need to allow flexibility on where to start, how many to print, etc. If the labels in the right-most 5160 column had to be tossed with wrong addresses for instance, it would be nice to be able to point and click the labels to use for our print. But I think scripting creating records in another database is still the answer - whether repeated copies of the same record or a set of records. Selecting where to print them on the page is still a pain. I'm eagerly watching this thread also, hoping for the all-time perfect solution. grin.gif

In truth, I copy the one address, paste it into Word label multiple times, then print it onto plain paper (to keep as a master) then run labels through the copy machine if I need more. I would prefer keeping it totally User-friendly and all within FM.

LaRetta

Link to comment
Share on other sites

Edited : The first version was too complex, and not enough dynamic

DanBrill said:

It seems like I need some way to create 1 to 29 empty records to use to fill up the sheet (assuming 30 label sheets) and put these at the front of the found set, and then delete them when the print job is over.

From what I understood, you'd like to have a 6 records labels printed from box 25th to 30th. And you want to print them even if already used by others (locked).

Here's a tedious scripted suggestion, that should work without the need of some record creation.

g_start = 24

g_number of records = 6

c_sortOrder = Patterncount(g_Multiline,ID)

g_Multiline (global text, a field where you'd store the 6 IDs)

g_counter (global, num)

gRandomPick (global, num)

Perform find for these 6 records.

Then

If[status(CurrentRecordCount)<= g_start+g_number of records]

Perform Script 2 [Your Record Creation script]

End Script

Else

#If you have more than 30 records in that file !

Go To Layout [a Layout with field ID]

CopyAllRecords

Go To Layout [a Layout with field g_Multiline]

Paste

#Now you have these 6 records stored

Show Omitted

# A script will Randomly pick your g_start number of records

SetField (gCounter, 0)

Loop

SetField (gRandomPick, Round(Random * (Status(CurrentFoundCount) + 0.5)), 0)

GoToRecord/Request/Page "gRandomPick"]

Omit Record

SetField (gCounter, gCounter + 1)

ExitLoopIf (gCounter = g_start)

End Loop

Show Omitted

#Now you have 30 records, with 6 c_sortOrder = 1 and the 24 others =0

Sort[by c_sortOrder, ascending] - unstored though, but 30 records shouldn't hurt.

Print Your Labels Here

If you want the first 24 labels blank, then your label should be calculated and return values to print only if

Patterncount(g_Multiline,ID)

With the same approach, if you want to print some labels in the middle of the page, using a g_start and a g_end, then :

1.You'd set a g_MultileneEnd by extracting from g_Multiline the Ids from FoundSet you don't want to be printed.

SetField[g_MultilineEnd, MiddleWords(g_Multiline, g_end, WordCount(g_Multiline))]

SetField[g_Multiline, MiddleWords(g_Multiline, 1,g_end-1)]

2. apply "2" as the result for these ending Ids by modifying the unstored c_sort calc this way :

Case(Patterncount(g_Multiline,ID),1, Case(Patterncount(g_MultilineEnd,ID),2,0))

If you want the records to be printed first, and the rest of the page blank, then set g_start to 1.

If from a foundset of 30 records, you want to print say the first already sorted 6 (g_end =6), you could also use a script along the lines of

Go To Record [g_end]

OmitNext[1,000,000-no dialog]

May be some other options too...

HTH

wink.gif

Link to comment
Share on other sites

I played a little more with the idea.

Here's one that should allow to :

1. Select a start block and end to either have your foundset printed in a classic mode, starting from a speific block, or in the "middle" of your sheet.

2. Select specific allocations for each label in your foundset, in case you want to re-use old label sheets with only some label blocks empty.

I didn't have the time to check for all errors, but it should work and give you the basic idea.

WasteLabelsHunter.fp5.zip

Link to comment
Share on other sites

Ugo, when do you sleep? wink.gif

Here's what I came up with, taking an entirely different approach than Ugo's. It's a 2-file solution which could be tied into any solution very easily. Main file is whatever file you have records in. The only thing you'd need to add to any file to make it work is a constant field c=1 (which you probably have already), a global number field 'i' that acts as a loop counter, and the LockedMessage calc which is used as part of a custom dialog. One relationship is needed (c=c) between the main file and the LabelSaver. The rest is done through scripts. LabelSaver does the printing.

I haven't done it, but it would be pretty easy to modify this to print a full page of a single label. Just import 1 record from the main file, duplicate it n times, and print as usual.

Thanks for everyone's input on this one.

Dan

LabelSaver.zip

Link to comment
Share on other sites

Hi Dan,

I like the idea of the "pick your label" from Layout.

I'm just missing the Custom Dialog in my old FM5.5. No way it could work without ?

And true is that an external file for this kind of job can be interresting.

Oh, I slept... Quite too much this week-end. smirk.gif

Link to comment
Share on other sites

Hey Ugo,

Yeah, it would work fine without the custom dialog. Just change it to a Show Message step and inform the user that someone else is locking the file. They'll have to guess who that user is. wink.gif The custom dialog will actually tell them the user's name by way of the LockedMessage calc:

"The LabelSaver file is currently locked by "&LabelSaver::CurrentHost&". Please retry in a moment. If it still fails, go wake up the user at "&LabelSaver::CurrentHost&" and tell them to finish the print job or close the file."

If anyone gets anything out of this, I hope it is the "pick your label" layout. That and the 30 underlying scripts were more than a little tedious to set up. No one should have to do that again.

Cheers,

Dan

Link to comment
Share on other sites

I just realized that it would be better to put the LockedMessage field in the LabelSaver file, and then refer to it via the relationship to LabelSaver in the custom dialog. This way it won't have to be re-created in every file that you might want to print labels from. And, if the calc is

"The LabelSaver file is currently locked by "&Status(CurrentHostName)&". Please retry in a moment. If it still fails, go wake up the user at "&Status(CurrentHostName)&" and tell them to finish the print job or close the file."

Then you can do away with the CurrentHost calc field in LabelSaver too.

Dan

Link to comment
Share on other sites

Why would you need to have the file unlocked to do the job ?

By creating a New record, you'd be taking possession of "the file".

Then you can select this record by a

Show All Records

Omit

Show Omitted

or

Go To Related Record by a SJ on ID.

Then you can add records and import the foundset.

At end script, delete the records you've built.

Good job you've made here anyway.

cool.gif

Link to comment
Share on other sites

Hmmm. I had feared that I would be creating the blank records in someone else's print job, and so designed it so each user would wait until the file was free.

But if a user opened the file and immediately did a find for c=0, they'd begin with an empty set. They could then create the blank records they'd need and then import. No 2 users should ever have the same found set, and so could use the file at the same time.

Am I right? I'm still getting used to thinking in multi-user environments, and at the moment have no way to test it.

Dan

Link to comment
Share on other sites

Dan,

I have a small 9 months experience with a LAN, which is still running thanks to daily adjustments and updates . The next move planned is a WAN so that our 3 entities here would share this same db. And I confess I'm pretty worried.

It would work without any "301" step.

We're not writing on records, and we don't need to have possesion of any record to perform either scripts. Same for the nested Copy All Records and Omit steps I suggested.

What would network be used for if we couldn't create new records !

Your file can be considered a "utility file", where you won't be crossing someone else's job, as it is totally scripted from the outside and no finds are made on it. You'll be presented with your set.

Link to comment
Share on other sites

Especially in multi-user environments, or environments with auto-assign serial numbers, I imagine the wise thing is to do is one global field related to the desired id# and fill in just one label's worth of fields drawing on the global relation. Since globals store separately for each user, and since no new records are created, it seems the most straightforward, no? Just have any 20 records in the found set if you want to print 20, etc.

But it doesn't solve the problem of how to start, say, 7 labels down. One could perhaps set a container field over everything else, and a script to blank it out for the first x records...

Link to comment
Share on other sites

Hi,

That was currently the solution I provided in the attachment. It also provided a way to have them printed say label 8, label 11, label 15 in case you need this feature.

But I'm rather convinced, even if more tedious to set, that Dan's idea of a separate file is a good one.

What would I need a Label sheet in some record file ? I think he is true. Another file is not problematical, and still, I don't get the Multi-user limitation, if this was your point.

Link to comment
Share on other sites

I have never thought much about this until the other day when soeone asked the same question on another forum, and I offered this:

If your labels had, say, 30 labels per sheet, the you could do the following...

Create a field called "BlankRecord"

Create a field called "CountPrinted"

Create a global Field called "SetLabelStart"

Create a global Field called "Remainder"

Create a field called "BlankMarker"

Create 29 blank records. (if your sheet holds 30 labels). In the blank records set the field "BlankRecord" to a value of "1" just as a wau to find the blanks later.

Set field "SetLabelStart" to "0".

Script 1 = "Find the number of records to be printed

#however you determine how many labels to be printed

Perform Find [Restore]

Set Field ["CountPrinted", "Status(CurrentFoundCount)"]

Set Field ["Remainder", "CountPrinted - (30 * Int(CountPrinted / 30))"]

Scrip 2 = set the correct number of blanks to print and reset SetLabelStart

#need to do nothing except add the remainder of starting label is the first label... meaning there are no found blanks.

If["SetLabelStart = 0"]

["SetLabelStart", "SetLabelStart + Remainder"]

Exit Script

Else

#you must find only your blank records ... by finding for the "1" in field BlankRecord

PerforPerform Find [Restore]

Go to Record/Request/Page [First]

Loop

Set Field ["BlankMarker", ""1""]

Exit Loop If ["Status(CurrentRecordNumber)= SetLabelStart"]

Go to Record/Request/Page [Next]

End Loop

Set Field ["SetLabelStart", "SetLabelStart + Remainder"]

End IF

Script 3 = Find and Sort and Print

#you must now find the blank records you have marked to print with the "1" in the BlankMarker field AND your records you really want to print

Perform Find [Restore]

#now you sort by BlankMarker in DECENDING order to put the blank records first (and then you can sort by however you want your real records sorted)

Sort [Restore, No Dialog]

Print

Now you need to clear the "BlankMarker" fields

Script 4 = Clear BlankMarker

#Find all the records where BlankMarker = "1"

Perform Find [Restore]

Go to Record/Request/Page [First]

Loop

Set Field ["BlankMarker", "" ""]

Go to Record/Request/Page [Next, exit after last]

End Loop

--------------------------------------------------------------------------------

That should do it.

(You could incorporate the loop in script 4 as the first part of script 2... I put it here last because it is logical to think of clearing the fields last)

You only have to make blank records once.... you just keep using them and it is all done behind the scenes. Now, be advised that I have never really done this, but I think it should work.

--------------------

Riley Waugh

WRW Solutions

St. Croix, Virgin Islands

Link to comment
Share on other sites

For a totally different angle on the problem of partial label pages here was our

solution.

Our label runs are quite large, and complex. We have in some cases 3 levels of

labels for a product, that being, a master pack, multi pack and innerbox. All with different labels and

different information required, and oh yeah different for each customer also.

Our standard label module uses a separate file that takes a complete sales order and

breaks it down into quantity and type of labels for each part number and quantity, uses the sales order number

as a serial number field to eliminate other users setting up label buffers once one is in place

or has already been recorded as printed, and then uses related data to fill in the blanks.

Because of the amount of partial label pages we were running into when we started this system,

we set up the label buffer to keep track and print the last page remainder of labels with the variable data

left blank...by variable data I mean box x of 24 where the x is left blank for hand writing, the remaining labels on the page would contain

all the other info, PO number Bar codes, etc, the but the box variable was left blank. As in

the real world boxes need to be changed out, labels get miss applied or illegible, etc. We found

we were reprinting many more labels and this took up valuable printer time. So if the box sequence

leaves 5 labels at the bottom of the last page, we print those with blank variable data so they can be hand written later, we also print another buffer quantity based on a percentage of the total labels for that particular part number if large enough.

Of coarse this does not work if this variable data must be in the form of a bar code or other info

that must be printed vs hand written, or perhaps your quantity of labels is quite small.

To the original point of this thread, using the same label buffer database you can set up the same buffer to print only certain records, (label locations), by giving the buffer blank data for the first x records. This of coarse assumes the blank labels are contiguous from the top either left to right or top to bottom.

Link to comment
Share on other sites

  • 3 weeks later...

Hi All,

I have to put together a solution wherein the user can choose which Avery label cell the single label data appears in. This way the user can make the best use of the used label sheets in the office. The way it works is that it takes the user to a simulated page of the labels (browse mode); they mouseclick the one they want the data to appear in, and it prints the data in that cell. I'm thinking this could work via an empty related DB with a calc field that references a container field with a white graphic on it. The resulting page actually has the same single label data in every label on the page, but all of the labels (except the one chosen by the user) are covered (via the built-in calc) with the white jpeg block in the container field. Haven't tried it yet. Would this work in theory? Any helpful comments would be appreciated before I start. Hoping somebody can stop me from wasting my time ;) )

John

Link to comment
Share on other sites

One other way to solve this problem is to get printer designed for printing labels. In case you are not familiar with label printers they run about $100 and use labels that come on a roll so you never have a problem with determining where to start. To print multiple copies of the same label you simply put a loop in the print routine. These things work so good that we have purchased quite a few of them.

Link to comment
Share on other sites

This topic is 6568 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
 Share

×
×
  • Create New...

Important Information

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