fix sql error when printing prescription label