Package reportgen.ren.report

Examples of reportgen.ren.report.ReportQuery


        //check super reports
        Field[] f = new Field[]{new Field("id", entity.getId(), Field.OPERATOR_NOT_EQUAL)};
        Iterator iterator = findEntityList(ReportgenQuery.class, f).iterator();
        while (iterator.hasNext()) {
            ReportgenQuery superReportQuery = (ReportgenQuery) iterator.next();
            ReportQuery superReport  = null;
            try {
                superReport = ReportFactory.fromString(superReportQuery.getId(),
                        superReportQuery.getQuery(), this);
            } catch (ReportException ex) {
                //do nothing
            }
            if(superReport == null) {
                continue;
            }
           
            Iterator<String> usedSubreportColumns = superReport.getUsedSubreportColumns(entity.getId()).iterator();
            while(usedSubreportColumns.hasNext()) {
                String col = usedSubreportColumns.next();
                if(!newCols.contains(col)) {
                    throw new ClipsServerException("Отчет '" + superReportQuery.getTitle()
                            + "' использует столбец данного отчета с именем '" + col
View Full Code Here


        //check all other reports in fack of using removing one
        Field[] f = new Field[]{new Field("id", entity.getId(), Field.OPERATOR_NOT_EQUAL)};
        Iterator iterator = findEntityList(ReportgenQuery.class, f).iterator();
        while (iterator.hasNext()) {
            ReportgenQuery superReportQuery = (ReportgenQuery) iterator.next();
            ReportQuery superReport  = null;
            try {
                superReport = ReportFactory.fromString(superReportQuery.getId(),
                        superReportQuery.getQuery(), this);
            } catch (ReportException ex) {
                continue;
            }

            ItemSelectorEditable<QueryExecuterSub> usedSubreports = superReport.getSubReports();
            for(int i=0; i<usedSubreports.size(); i++) {
                QueryExecuterSub col = usedSubreports.get(i);
                if(col.getReportId() == entity.getId()) {
                    throw new ClipsServerException("Отчет '" + col.getReportTitle()
                            + "' не может быть удален, поскольку его использует отчет '"
View Full Code Here

    public Object doReport(String reportXML) throws ClipsServerException {
        checkCommandAccessibility(COMMAND_CREATE);
        Object rr = null;
        try {
            System.out.println("TESTING XML:\n" + reportXML);
            ReportQuery report = ReportFactory.fromString(0, reportXML, this);
            rootQuery = new QueryExecuter(0, report, "Тестовый отчет", "");
            rr = executeQuery(rootQuery);
        } catch (Exception reportException) {
            throw new ClipsServerException("При обработке отчета произошла ошибка", reportException);
        }
View Full Code Here

        if(!canCollabToDo(getCollaboratorId())) {
            checkCommandAccessibility(COMMAND_READ);
        }
        ReportgenQuery query = findEntity(ReportgenQuery.class, id);
        try {
            ReportQuery report = ReportFactory.fromString(id, query.getQuery(), this);
            rootQuery = new QueryExecuter(id, report, query.getTitle(), query.getDescription());
            return executeQuery(rootQuery);
        } catch (Exception reportException) {
            throw new ClipsServerException("При обработке отчета произошла ошибка", reportException);
        }
View Full Code Here

        ReportVersion version = getVersion(reportXML);
        if(!version.isSupported()) {
            throw new ReportException("Неподдерживаемая версия отчета: " + version);
        }

        return new ReportQuery(parseXML(reportXML), subQueryLoader);
    }
View Full Code Here

    private int reportContinueID;

    public QueryLocal(AuditListener al) throws ClipsException, ReportException {
        super(al);
        this.reportQuery.set(new ReportQuery());
        isDirtyQuery = true;
    }
View Full Code Here

            throw new RuntimeException("Отчет не корректен и не может быть изменен");
        }
        if(!reportQuery.inCache()) {
            try {
                QueryDetails d = getDetails();
                ReportQuery req = ReportFactory.fromString(d.id, d.query, queryLoader);
                 this.reportQuery.set(req);
            } catch (ClipsException ex) {
                throw new ReportException("Details receiving failed.", ex);
            }
        }
View Full Code Here

TOP

Related Classes of reportgen.ren.report.ReportQuery

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.