ExecutionYear lastReportedExecutionYear = approvedEnrolments.iterator().next().getExecutionPeriod().getExecutionYear();
ExecutionYear lastReportedExecutionYear = approvedEnrolments.get(0).getExecutionPeriod().getExecutionYear();
    protected void fillReport() {	super.fillReport();	final ApprovementCertificateRequest approvementCertificateRequest = (ApprovementCertificateRequest) getDocumentRequest();	final List<Enrolment> approvedEnrolments = new ArrayList<Enrolment>(approvementCertificateRequest.getRegistration().getApprovedEnrolments());	parameters.put("numberApprovements", Integer.valueOf(approvedEnrolments.size()));	final ComparatorChain comparatorChain = new ComparatorChain();	comparatorChain.addComparator(new BeanComparator("executionPeriod"));	comparatorChain.addComparator(new BeanComparator("name"));	Collections.sort(approvedEnrolments, comparatorChain);	final StringBuilder approvementsInfo = new StringBuilder();	ExecutionYear lastReportedExecutionYear = approvedEnrolments.iterator().next().getExecutionPeriod().getExecutionYear(); 	for (final Enrolment approvedEnrolment : approvedEnrolments) {	    final ExecutionYear executionYear = approvedEnrolment.getExecutionPeriod().getExecutionYear();	    final EnrolmentEvaluation latestEnrolmentEvaluation = approvedEnrolment.getLatestEnrolmentEvaluation();	    	    if (executionYear != lastReportedExecutionYear) {		lastReportedExecutionYear = executionYear;		approvementsInfo.append("\n");	    }	    	    final StringBuilder gradeInfo = new StringBuilder();	    gradeInfo.append(" ").append(latestEnrolmentEvaluation.getGrade());	    gradeInfo.append(		    StringUtils.rightPad(			    "(" 			    + enumerationBundle.getString(latestEnrolmentEvaluation.getGrade()) 			    + ")",			    11,			    ' '));	    gradeInfo.append(" ").append(resourceBundle.getString("label.in"));	    	    gradeInfo.append(" ").append(executionYear.getYear());	    	    approvementsInfo.append(		    StringUtils.multipleLineRightPadWithSuffix(			    approvedEnrolment.getName().getContent(LanguageUtils.getLanguage()).toUpperCase(),			    LINE_LENGTH, 			    '-',			    gradeInfo.toString())).append("\n");	}	parameters.put("approvementsInfo", approvementsInfo.toString());    }