Package cli_fmw.report

Examples of cli_fmw.report.CombinedReportCreator


    @Override
    public void print() {
        try {
            if (readyForPrint()) {
                CombinedReportCreator parCreator = PrintCreators.createCombinedReportHeader(getClass());
                prescriptionLocal.print(parCreator);
                parCreator.finish();
            }
        } catch (ClipsException ex) {
            MessageBox.showException(ex);
        }
    }
View Full Code Here


            if (readyForPrint()) {
                if (!serRenLocal.isRendered()) {
                    MessageBox.showInfo("Услуга не оказана");
                    return;
                }
                CombinedReportCreator parCreator = ReporterFactory.createCombinedReporter(getClass(), 1);
                CombinedReportOptions ops = new CombinedReportOptions();
                ops.topMargin =0;
                ops.bottomMargin = 0;
                ops.leftMargin =0;
                ops.rightMargin = 0;
                ops.setPageA5();
                ops.setOrentation(PageOrentation.horizontal);
                parCreator.setUpReport(null, ops, null);

                DiseaseLocal diseaseLocal = serRenLocal.getDiseaseLocal();

                diseaseLocal.formPrintFields(serRenLocal.getCollaboratorFunctions());
                diseaseLocal.print(parCreator);
                parCreator.finish();
            }
        } catch (ClipsException ex) {
            MessageBox.showException(ex);
        }
    }
View Full Code Here

    @Override
    public void print() {
        try {
            if (readyForPrint()) {
                CombinedReportCreator parCreator = PrintCreators.createCombinedReportHeader(getClass());

                recommedation.print(parCreator);
                parCreator.finish();
            }
        } catch (ClipsException ex) {
            MessageBox.showExceptionOnly(ex);
        }
    }
View Full Code Here

    @Override
    public void print() {
        try {
            if (readyForPrint()) {
                CombinedReportCreator parCreator = PrintCreators.createCombinedReportHeader(getClass());
                diagnosisLocal.print(parCreator);
                parCreator.finish();
            }
        } catch (ClipsException ex) {
            MessageBox.showException(ex);
        }
    }
View Full Code Here

    @Override
    public void print() {
        try {
            if (readyForPrint()) {
                CombinedReportCreator parCreator = PrintCreators.createCombinedReportHeader(getClass());
                contraindicationLocal.print(parCreator);
                parCreator.finish();
            }
        } catch (ClipsException ex) {
            MessageBox.showException(ex);
        }
    }
View Full Code Here

                    }
                }
                else {
                    collab = collabs.get(0);
                }
                CombinedReportCreator parCreator = ReporterFactory.createCombinedReporter(getClass(), 1);
                CombinedReportOptions ops = new CombinedReportOptions();
                ops.topMargin =0;
                ops.bottomMargin = 0;
                ops.leftMargin =0;
                ops.rightMargin = 0;
                ops.setPageA5();
                ops.setOrentation(PageOrentation.horizontal);
                parCreator.setUpReport(null, ops, null);

                diseaseLocal.formPrintFields(collab);
                diseaseLocal.print(parCreator);
                parCreator.finish();
               
            }
        }catch (ClipsException ex) {
            MessageBox.showException(ex);
        }
View Full Code Here

    getSelectedNodes(r);
    if (list.isEmpty()) {
        return;
    }

    CombinedReportCreator parCreator = ReporterFactory.createCombinedReporter(getClass(), 1);
    CombinedReportOptions options = new CombinedReportOptions();
    options.setPageA5();
    options.setOrentation(PageOrentation.horizontal);
    options.leftMargin = 0;
    options.rightMargin = 0;
    options.subReportNewPageType = CombinedReportOptions.NewPageType.beginNotFirst;
    parCreator.setUpReport(null, options, null);

    try {
        for (int i = 0; i < list.size(); i++) {
            if (list.get(i) instanceof DelegatePrintable) {
                DelegatePrintable del = (DelegatePrintable) list.get(i);
                if (del instanceof SerRenLocal || del instanceof DiseaseLocal || del instanceof EmcLocal || del instanceof FollowupLocal) {
                    del.print(parCreator);
                } else {
                    CombinedReportCreator subCreator = parCreator.createCombinedReporter(getClass(), 2);
                    CombinedReportOptions ops = new CombinedReportOptions();
                    ops.leftMargin = 0;
                    ops.rightMargin = 0;
                    ops.topMargin = 0;
                    ops.bottomMargin = 0;
                    subCreator.setUpReport(null, ops, null);

                    FormReportCreator creator = subCreator.createFormReporter(PrintCreators.class, 1);
                    creator.createReport(new HashMap<String, Object>(), null);
                    creator.finish();

                    del.print(subCreator);
                    subCreator.finish();
                }
            }
        }
        parCreator.finish();
    } catch (ClipsException ex) {
View Full Code Here

            if (readyForPrint()) {
                if (innerPage != null) {
                    ((Printable)innerPage).print();
                }
                else {
                    CombinedReportCreator parCreator = ReporterFactory.createCombinedReporter(getClass(), 1);
                    CombinedReportOptions ops = new CombinedReportOptions();
                    ops.topMargin =0;
                    ops.bottomMargin = 0;
                    ops.leftMargin =0;
                    ops.rightMargin = 0;
                    ops.setPageA5();
                    ops.setOrentation(PageOrentation.horizontal);
                    parCreator.setUpReport(null, ops, null);

                    emcLocal.getClient().print(parCreator);
                    parCreator.finish();
                }
            }
        }catch (ClipsException ex) {
            MessageBox.showException(ex);
        }
View Full Code Here

            if (needDlg) {
                int res = MessageBox.showConfirmYesNo(MessageBox.C_PRINT_DIRECTION_TO_CHECKUP);
                if (res == MessageBox.ANSWER_YES) {
                    try {
                        CombinedReportCreator parCreator = ReporterFactory.createCombinedReporter(getClass(), 1);
                        CombinedReportOptions options = new CombinedReportOptions();
                        options.setPageA5();
                        options.setOrentation(PageOrentation.horizontal);
                        options.leftMargin = 0;
                        options.rightMargin = 0;
                        options.subReportNewPageType = CombinedReportOptions.NewPageType.beginNotFirst;
                        parCreator.setUpReport(null, options, null);
                        FormReportCreator creator;
                        CombinedReportCreator subCreator;
                        CombinedReportOptions ops;
                        for (int i = 0; i < newSerrenList.size(); i++) {
                            CheckupLocal checkupLocal = newSerrenList.get(i).getAnalysis();
                            if (checkupLocal != null) {
                                subCreator = parCreator.createCombinedReporter(getClass(), 2);
                                ops = new CombinedReportOptions();
                                ops.leftMargin = 0;
                                ops.rightMargin = 0;
                                ops.topMargin = 0;
                                ops.bottomMargin = 0;
                                subCreator.setUpReport(null, ops, null);

                                creator = subCreator.createFormReporter(PrintCreators.class, 1);
                                creator.createReport(new HashMap<String, Object>(), null);
                                creator.finish();
                                checkupLocal.print(subCreator);
                                subCreator.finish();
                            }
                        }
                        parCreator.finish();
                    } catch (ClipsException ex) {
                        MessageBox.showException(ex);
View Full Code Here

    }

  private static final int        SICK_LIST_PAGE_WIGHT = 413;
  private static final int        SICK_LIST_SUBREPORT_PAGE_WIGHT = 350;
  public void printOverBlank() throws ClipsException{
    CombinedReportCreator    combined = ReporterFactory.createCombinedReporter(getClass(), 1);
    CombinedReportOptions    reportOptions = new CombinedReportOptions();
    reportOptions.setPageA5();
    reportOptions.setOrentation(PageOrentation.vertical);
    //reportOptions.reportWidht = SICK_LIST_PAGE_WIGHT;
    //reportOptions.reportHeight = 470;
    reportOptions.leftMargin = ClipsConfig.getInstance().getSicklistLeftMarign();
    reportOptions.fixRightMarign(SICK_LIST_SUBREPORT_PAGE_WIGHT);
    reportOptions.topMargin = ClipsConfig.getInstance().getSicklistTopMarign();
    reportOptions.bottomMargin = 0;
    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());

    data.put("prev_sick_list_id", getPreviousSicklist() == null? null: getPreviousSicklist().getSerial());
    data.put("day_month_open", dateFrom.get(GregorianCalendar.DAY_OF_MONTH) + " " + DateTimeUtils.monthToString(dateFrom.get(GregorianCalendar.MONTH)));
    String      yearOp = "" + dateFrom.get(GregorianCalendar.YEAR);
    data.put("year_open", yearOp.substring(yearOp.length() - 2));
    data.put("date_open", dateFrom.getTime());
        data.put("dis_type", getDisability().getID());
    data.put("date_close", getDateToWork() == null? null: getDateToWork().getTime());
    if (getProlongationCount() > 0){
      GregorianCalendar dateTill = getTill(0);
      data.put("date_till_1", dateTill == null? null: dateTill.getTime());
    }
    else{
      data.put("date_till_1", null);
    }
    if (getProlongationCount() > 1){
      GregorianCalendar dateTill = getTill(1);
      data.put("date_till_2", dateTill == null? null: dateTill.getTime());
    }
    else{
      data.put("date_till_2", null);
    }
    if (getProlongationCount() > 2){
      GregorianCalendar dateTill = getTill(2);
      data.put("date_till_3", dateTill == null? null: dateTill.getTime());
    }
    else{
      data.put("date_till_3", null);
    }
    if (getProlongationCount() > 3){
      GregorianCalendar dateTill = getTill(3);
      data.put("date_till_4", dateTill == null? null: dateTill.getTime());
    }
    else{
      data.put("date_till_4", null);
    }

        creator.createReport(null, null, data.entrySet(), null);
        creator.finish();
    combined.finish();
  }
View Full Code Here

TOP

Related Classes of cli_fmw.report.CombinedReportCreator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.