Package reportgen.utils

Examples of reportgen.utils.ReportException


            while (res instanceof UserInputChunk) {
                UserInputChunk chunk = (UserInputChunk) res;
                dlg.addPanel(new UserInputPanel(chunk));
                dlg.setVisible(true);
                if (dlg.isOK()) {
                    throw new ReportException("Генерация отчета отменена");
                }
                res = report.continueReport(chunk);
            }
            QueryResults results = (QueryResults) res;
            UserChoiceDlg userChoiceDlg = new UserChoiceDlg(parent, results,
View Full Code Here


        title = getStringAttribute(element, Core.ATTR_TITLE);

        //root
        Element entityEl = element.getChild(QueryEntity.TAG);
        if(entityEl == null) {
            throw new ReportException("Не найден основной объект отчета");
        }
        Context localContext = getSQLContext();
        root = new QueryEntity(localContext, entityEl, getContextGroup());

        conditionInlines = new InlinesConditionList(this, element, getSQLContext());
View Full Code Here

    }

    @Override
    public void ensureSafeRemove(Object obj2remove) throws ReportException {
        if (conditions.isContain(obj2remove)) {
            throw new ReportException("Нельзя удалить этот элемент, ссылка на него содержится в "
                    + "условиях выборки");
        }
    }
View Full Code Here

    }
   
    @Override
    public void validate() throws ReportException {
        if (root == null) {
            throw new ReportException("Отсутствуют объекты выборки");
        }
        conditions.validate();
    }
View Full Code Here

                }
            }
        }
       
        if(visibleColumns.size() == 0) {
            throw new ReportException("Нет видимых столбцов");
        }

        extract(SimpleFormatColMode.GROUP1);
        extract(SimpleFormatColMode.GROUP2);
        extract(SimpleFormatColMode.GROUP3);

        if(getRealVisibleColumns().size() == 0) {
            throw new ReportException("Невозможно группировать таблицы по всем видимым колонкам");
        }

    }
View Full Code Here

    @Override
    public void appendToQuery(SQLStream sql) throws ReportException {
        QSQLBuilder builder = root.getSQLBuilder(getLoadable());
        if(getResult().isEmpty()) {
            throw new ReportException("Не выбрано ни одного объекта или свойства объекта");
        }
        String entities = builder.getSQLEntities();
        String links = builder.getSQLEntityLinks();
        sql.append("(SELECT ");
        sql.append(isDistinct() ? "DISTINCT ":"");
View Full Code Here

        canBeOmitted = XML.getBoolAttribute(element, ATTR_CANBEOMITTED, false, false);
        constant = XML.getBoolAttribute(element, ATTR_CONST, false, false);

        if(size() == 0) {
            throw new ReportException("Пустой входной параметр: " + selectTitle);
        }
    }
View Full Code Here

     * @param value the value to set
     */
    public void addValue(MathExpressionConstAbstract value) throws ReportException {
        if(size() != 0) {
            if(!value.getCls().equals(get(0).getCls())) {
                throw new ReportException("Добавляемый тип и тип первого элемента не совпадают");
            }
        }
        add(value);
    }
View Full Code Here

     * @throws reportgen.ren.exception.ReportException
     */
    public void setUserInput(UserInput ui) throws ReportException {
        if(!ui.isSelected()) {
            if(!ui.isCanBeOmitted()) {
                throw new ReportException("Пользователь не сделал выбор");
            }
            omitted = true;

        } else if(size() > 1) {
            UserInputSelect uis = (UserInputSelect) ui;
            ArrayList<Integer> selected = uis.getSelected();
            int selIndex = selected.get(0);
            if(selIndex >= size()) {
                throw new ReportException("Пользователь сделал некорректный выбор");
            }

            if(selIndex != 0) {
                while(selIndex != 0) {
                    selIndex = moveUp(selIndex);
                }
            }
            omitted = false;
        } else {
            UserInputEditable uie = (UserInputEditable) ui;
            MathExpressionConstAbstract val = get(0);
            if(!val.getCls().equals(uie.getValue().getClass())) {
                throw new ReportException("Попытка ввода данных несоответствующего типа");
            }
            Object newValue = uie.getValue();
            MathExpressionConstAbstract newVal = val.make(newValue);
            insertBefore(val, newVal);
            remove(val);
View Full Code Here

        @Override
        protected void appendNewCore() throws ReportException {
            CoreFactoryList factory = new CoreFactoryList();
            List<String> cores = factory.getCores();
            if(cores.size() == 0) {
                throw new ReportException("Нет доступных типов выборок");
            }
            QCore core = null;
            if(cores.size() == 1) {
                core = factory.createCore(0, reportQuery.getReportContext(new NoNeedAtom()));
            } else {
View Full Code Here

TOP

Related Classes of reportgen.utils.ReportException

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.