private void runAssemblyAllReport() {
    String reportFileLocation = getReportFileLocation("assemblysum.txt");
    if (reportFileLocation != null) {
      String fromDate = reportControl.getFromAssemblyDate().getText();
      String toDate = reportControl.getToAssemblyDate().getText();
      Date reportFromDate = null;
      Date reportToDate = null;
      try {
        reportFromDate = AssemblyMonitoring.DISPLAY_DATE_FORMAT.parse(fromDate);
      } catch (ParseException e) {
        reportFromDate = null;
      }
      try {
        reportToDate = AssemblyMonitoring.DISPLAY_DATE_FORMAT.parse(toDate);
      } catch (ParseException e) {
        reportToDate = null;
      }

      LinkedList<Monitoring> monitoringData = new LinkedList<Monitoring>();
      for (Order order : orderTableModel.getData()) {
        List<Monitoring> monitorings = order.getMonitoring();
        if (monitorings != null) {
          for (Monitoring monitoring : monitorings) {
            if (AssemblyMonitoring.isDateWithinPeriod(monitoring.getDate(),
                reportFromDate, reportToDate)) {
              monitoringData.add(monitoring);
            }
          }
        }
      }

      ReportFormatter rf = new ReportFormatter(
          new int[] { 10, 5, 10, 14, 12,25,10, 9, 12, 12, 9, 9, 9, 9, 2, 14, 6, 6, 9, 7, 9,
              30 },
          new int[] { ReportFormatter.ALLIGN_LEFT,
              ReportFormatter.ALLIGN_CENTER, ReportFormatter.ALLIGN_LEFT,
              ReportFormatter.ALLIGN_LEFT, ReportFormatter.ALLIGN_LEFT,
              ReportFormatter.ALLIGN_LEFT,ReportFormatter.ALLIGN_RIGHT,
              ReportFormatter.ALLIGN_RIGHT, ReportFormatter.ALLIGN_RIGHT,
              ReportFormatter.ALLIGN_RIGHT, ReportFormatter.ALLIGN_RIGHT,
              ReportFormatter.ALLIGN_RIGHT, ReportFormatter.ALLIGN_RIGHT,
              ReportFormatter.ALLIGN_RIGHT, ReportFormatter.ALLIGN_RIGHT,
              ReportFormatter.ALLIGN_RIGHT, ReportFormatter.ALLIGN_CENTER,
              ReportFormatter.ALLIGN_CENTER, ReportFormatter.ALLIGN_RIGHT,
              ReportFormatter.ALLIGN_RIGHT, ReportFormatter.ALLIGN_CENTER,
              ReportFormatter.ALLIGN_LEFT },
          new boolean[] { true, true, true, true, true,true, true, true, true, true, true,
              true, true, true, true, true, true, true, true, true, true, true });

      rf.addText(
          "Od: " + AssemblyMonitoring.DISPLAY_DATE_FORMAT.format(reportFromDate)
              + " Do: "
              + AssemblyMonitoring.DISPLAY_DATE_FORMAT.format(reportToDate)
              + " Datum vytvorenia reportu: "
              + AssemblyMonitoring.STORAGE_DATE_FORMAT.format(new Date()));
      rf.addNewLine();
      rf.addNewLine();
      rf.addCenteredLine("Monitoring montaze za obdobie");
      rf.addNewLine();
      rf.addNewLine();
      rf.addColumnText("Datum");
      rf.addColumnText("Zmena");
      rf.addColumnText("Cislo_IO");
      rf.addColumnText("Cislo_vyrobku");
      rf.addColumnText("ID_operatora");
      rf.addColumnText("Meno_operatora");
      rf.addColumnText("Norma/hod.");
      rf.addColumnText("OK_ks");
      rf.addColumnText("NOK_procesne_ks");
      rf.addColumnText("NOK_nabehove_ks");
      rf.addColumnText("NOK_ks");
      rf.addColumnText("Spolu_ks");
      rf.addColumnText("NOK_%");
      rf.addColumnText("Vykon_(%)");
      rf.addColumnText("+-");
      rf.addColumnText("Efektivita_(%)");
      rf.addColumnText("Cas_od");
      rf.addColumnText("Cas_do");
      rf.addColumnText("Prestavka");
      rf.addColumnText("Prestoj");
      rf.addColumnText("Cisty_cas");
      rf.addColumnText("Poznamka");
      rf.addNewLine();

      Collections.sort(monitoringData, new Comparator<Monitoring>() {
        @Override
        public int compare(Monitoring monitoring1, Monitoring monitoring2) {
          return monitoring1.compareTo(monitoring2);
        }
      });
      int numNormPassed = 0;
      int numNormFailed = 0;
      for (Monitoring monitoring : monitoringData) {
        rf.addNewLine();
        rf.addColumnText(AssemblyMonitoring.DISPLAY_DATE_FORMAT
            .format(monitoring.getDate()));
        rf.addColumnText(String.valueOf(monitoring.getShift()));
        rf.addColumnText(monitoring.getOrderEntity().getOrderNumber());
        rf.addColumnText(monitoring.getOrderEntity().getItemNumber());
        rf.addColumnText(monitoring.getUserId());
        rf.addColumnText(
            assemblyUserModel.getUser(monitoring.getUserId()).getUserName().replaceAll(" ", "_"));
        rf.addColumnText(AssemblyMonitoring.DECIMAL_FORMAT
            .format(monitoringTableModel.calcNorm(monitoring)));
        rf.addColumnText(String.valueOf(monitoring.getPieces()));
        rf.addColumnText(String.valueOf(monitoring.getNonOkProcessed()));
        rf.addColumnText(String.valueOf(monitoring.getNonOkLoaded()));
        rf.addColumnText(String.valueOf(monitoringTableModel.calcSumNonOkPieces(monitoring)));
        rf.addColumnText(
            String.valueOf(monitoringTableModel.calcSumPieces(monitoring)));
        rf.addColumnText(AssemblyMonitoring.DECIMAL_FORMAT
            .format(monitoringTableModel.calcPercentNonOkPieces(monitoring)));
        rf.addColumnText(AssemblyMonitoring.DECIMAL_FORMAT
            .format(monitoringTableModel.calcEfficiency(monitoring)));
        String sign = monitoringTableModel.calcSign(monitoring);
        rf.addColumnText(sign);
        if (sign.startsWith("-")) {
          numNormFailed++;
        } else {
          numNormPassed++;
        }
        rf.addColumnText(AssemblyMonitoring.DECIMAL_FORMAT
            .format(monitoringTableModel.calcEffectivity(monitoring)));
        rf.addColumnText(AssemblyMonitoring.DISPLAY_TIME_FORMAT
            .format(monitoring.getFromTime()));
        rf.addColumnText(AssemblyMonitoring.DISPLAY_TIME_FORMAT
            .format(monitoring.getToTime()));
        rf.addColumnText(String.valueOf(monitoring.getBreakTime()));
        rf.addColumnText(String.valueOf(monitoring.getPauseTime()));
        rf.addColumnText(AssemblyMonitoring.DISPLAY_TIME_FORMAT
            .format(monitoringTableModel.calcEfficientTime(monitoring)));
        rf.addColumnText(monitoring.getComment());
      }
      rf.addNewLine();
      rf.addNewLine();
      rf.addText("Pocet zaznamov so SPLNENOU normou: " + numNormPassed);
      rf.addNewLine();
      rf.addText("Pocet zaznamov s NESPLNENOU normou: " + numNormFailed);
      rf.addNewLine();
      rf.addText("Pocet zaznamov spolu: " + (numNormFailed + numNormPassed));

      writeToFile(reportFileLocation,rf.getReportText());

      MessageBox.displayMessageBox(reportControl.getShell(),
          SWT.ICON_INFORMATION, "Info",
          "Report bol vygenerovany do suboru: " + reportFileLocation);
    }

  }