5 Replies Latest reply on Jul 30, 2013 9:16 AM by philmodjunk

    Lable print script

    Stuee

      Title

      Lable print script

      Post

           Hi all.

           I am trying to set up a print label button with extra options.

           I currently have 2 buttons setup Big label and small label, each button prints to the corresponding lable printer.

           I would like when i press a button it will either take to a new window or pop up window asking how many to print, i input number then when the label prints it also inputs into 2 boxes i already have setup  "BoxNo" and BoxOf"   So if i put in 3 labels each lable with say box 1 of 3, box 2 of 3  and so on.

           Thanks for any assistance in advance.

            

           Stuart

        • 1. Re: Lable print script
          philmodjunk

               Are these label printers that print one label at a time? (not avery style multiple column sheets of labels...)

          • 2. Re: Lable print script
            Stuee

                 yes a 1 label at a time printers. 

            • 3. Re: Lable print script
              philmodjunk

                   Then you have several options:

                   Option1: Use a temporary table for printing that is liked to the primary key of your original table in a relationship. A script can generate one record for each label and by assigning the correct value to the foreign key field  in those records, you can show data from any fields you want in your oriignal table on this label layout. Then your "1 of 2" text can be used by inserting the layout symbols (Via the insert menu while in layout mode) fo rthe current record number and the total number of records into the appropriate merge text.

                   Option 2: Use a script with a loop that prints each label as a different job. You can specify the number of labels in a global field and a variable or global field can be incremented (add 1) each time the script prints a label.

                   Option 3: look into plug ins. There's one I know of FMButler that permits much more detailed control of the printing process than is possible with just FileMaker.

              • 4. Re: Lable print script
                Stuee

                     I'm not a programmer and learning as i go along and appreciate your help.

                     Where i place the label area on my order page it would be good to have a small box with a toggle select for big or small label then you put in a number of labels in the box next to it then press print.

                     most of my scripts i have setup say for uncover opens the invoice page then prints then closes and returns back to the original order page. I don't mind something like that.

                     How can i do this.

                      

                     Thanks 

                      

                      

                • 5. Re: Lable print script
                  philmodjunk

                       Define two fields in your order table: LabelSize and LabelQty.

                       Use a button with a script similar to:

                       Freeze Window
                       If [ LabelSIze = "Large" //specify the value you use in your value list for large values in quotes here]
                          PerformScript ["LargeLabelPrint" ; Parameter: LabelQty ]
                       Else
                          PerformScript["SmallLabelPrint" ; Parameter: LabelQty ]
                       End If

                       Create a LargeLabelPrint script similar to this:

                       Go to Layout ["LargeLabel" (Orders)] ---> I'm guessing as to the name to put in parenthesis here
                       Set Variable [$Copies ; Get ( ScriptParameter )]
                       Loop
                           Set Variable [$K ; Value: $K + 1]
                           Print [Restore ; no dialog]---> specify Current Record and the correct printer here
                           Exit Loop If [$K > $Copies ]
                       End Loop
                       Go to Layout [ Original Layout]

                       Your script for printing small labels would be nearly identical except that you'd have it go to a different layout and specify a different printer in the Print step.