try {
if (readyForPrint()) {
String title = "Расход материалов для услуги: ";
String group = "";
DirectoryServicesGroupItem parent = service.getGroup();
ArrayList<String> titles = new ArrayList<String>();
while (parent != null) {
titles.add(parent.getTitle()+ "\n");
parent = parent.getParent();
}
int k = titles.size() - 1;
String iS;
for (int i = k; i > -1; i--) {
iS = titles.get(i);