Barcode issue in LAB

hello, please how can i setup barcode for sample test and print it on tube in LABORATORY

Not straightforward.

Are you printing to a label printer (if so what make?) or a standard printer with a sheet of label?

firstly. please i want to learn how to configure or generare code for label contains collected by& date in laboratory, secondly i use HPRT printer specially for labels

Not familiar with that brand, only used zebra and CAB label printers.

I put this tutorial together on how to get the data you needed and send it to a network attached Zebra printer. It should at least give you a start on how to get the data you want to transmit to the printer