combined.setUpReport(null, reportOptions, null);
FormReportCreator creator = combined.createFormReporter(getClass(), 3);
GregorianCalendar dateFrom = getDateOpen();
ClientLocal client = getClient();
HashMap<String, Object> data = new HashMap<String, Object>();
data.put("client", client.toString());
data.put("client_is_male", client.getSex().isMale());
if (client.getBorn() != null){
data.put("client_age", DateTimeUtils.calcAge(client.getBorn(), dateFrom.getTime()));
}
else{
data.put("client_age", null);
}
data.put("emc_code", client.getNumberEmc());
if (getProlongationCount() > 0){
Address adr = getSerRen(0).getPolisData().getAddress();
if (adr == null){
adr = client.getAddress();
}
data.put("client_address", adr == null? null: adr.toStringShort());
}
if (getOpener() == null){
data.put("collaborator", getAltOpener());
}
else{
ClientLocal clolClient = new ClientLocal(getOpener().getDetails().getClient(), null);
data.put("collaborator", clolClient.getSurname().getTitle());
}
DirectoryEnterpriseItem ent = getEnterprise();
data.put("clientJob", ent == null ? getOtherDirection() : ent.getTitle());