To print patron barcodes by homerooms, go to Reports>Patron Reports> Labels/Cards-Barcode Labels. Fix the settings like below and run report.