public void createChartModelByPlace() {
   chartModelByPlace = new PieChartModel();
   for (Report rp : repByPlaceList) {
     System.out.println("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n\n\n" + rp);
     chartModelByPlace.set(rp.getOrigin() + "-" + rp.getDestination(), rp.getTotal());
   }
 }
 public void createChartModelByDate() {
   chartModelByDate = new CartesianChartModel();
   LineChartSeries sum = new LineChartSeries();
   sum.setLabel("Sum");
   for (Report rp : repByDateList) {
     System.out.println(
         "____________________________________________________________________\n\n\n" + rp);
     sum.set(rp.getDate(), rp.getTotal());
   }
   chartModelByDate.addSeries(sum);
 }
 @Override
 public String getReportTypeForAjaxCall(String reportClassCode) throws Exception {
   Collection reportTypes = getReportTypesUsingReportClassCode(reportClassCode);
   String attributeNames = "";
   for (Object aReportCode : reportTypes) {
     Report aReport = businessObjectService.findBySinglePrimaryKey(Report.class, aReportCode);
     if (aReport != null) {
       attributeNames += "," + aReportCode + ";" + aReport.getDescription();
     }
   }
   return attributeNames;
 }
  public List<ReportParameter> getAvailableParameters(Report report) throws ProviderException {
    List<ReportParameter> parameters = getReportParameters();

    Iterator<ReportParameter> iterator = parameters.iterator();
    while (iterator.hasNext()) {
      ReportParameter rp = iterator.next();

      Iterator<ReportParameterMap> reportIterator = report.getParameters().iterator();
      while (reportIterator.hasNext()) {
        ReportParameterMap rpMap = reportIterator.next();

        if (rp.getId().equals(rpMap.getReportParameter().getId())) {
          parameters.remove(rp);
          iterator = parameters.iterator();
        }
      }
    }

    return parameters;
  }
  public List<ReportParameter> getReportParameters(Report report, String type)
      throws ProviderException {
    List<ReportParameter> parameters = new ArrayList<ReportParameter>();

    List<ReportParameterMap> allParameters = report.getParameters();

    if (allParameters != null) {
      Iterator<ReportParameterMap> iterator = allParameters.iterator();

      while (iterator.hasNext()) {
        ReportParameterMap rpMap = iterator.next();

        if (rpMap.getReportParameter().getType().equals(type)) {
          parameters.add(rpMap.getReportParameter());
        }
      }
    }

    return parameters;
  }
 private void jMenuItem12ActionPerformed(
     java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jMenuItem12ActionPerformed
   Report r = new Report();
   r.setVisible(true);
   setVisible(false);
 } // GEN-LAST:event_jMenuItem12ActionPerformed