Package reportgen.ren.report.items

Examples of reportgen.ren.report.items.ResultColumnList


        } catch (ReportException ex) {
            throw new ClipsServerException("Попытка сохранения некорректного отчета", ex);
        }

        HashSet<String> newCols = new HashSet<String>();
        ResultColumnList newColsSelector = report.getColumns();
        for(int i=0; i<newColsSelector.size(); i++) {
            newCols.add(newColsSelector.get(i).getTitle());
        }

        //check super reports
        Field[] f = new Field[]{new Field("id", entity.getId(), Field.OPERATOR_NOT_EQUAL)};
        Iterator iterator = findEntityList(ReportgenQuery.class, f).iterator();
View Full Code Here


    }

    @Override
    public List<ReportResultColumn> getReportResult() {
        List<ReportResultColumn> res = super.getReportResult();
        ResultColumnList cols = report.getColumns();
        for (int i = 0; i < cols.size(); i++) {
            res.add(cols.get(i));
        }
        return res;
    }
View Full Code Here

        List<Map> models = new LinkedList<Map>();
        for(int i=0; i<results.getRowCount(); i++) {
            ResultsRow row = results.getRow(i);

            Map<ResultColumn, Object> model = new HashMap<ResultColumn, Object>();
            ResultColumnList cols = query.getColumns();
            for(int j=0; j< cols.size(); j++) {
                model.put(cols.get(j).getProperties(), row.getValue(j));
            }
            models.add(model);
        }

        for(TableProcessor format: list) {
View Full Code Here

    /**
     *
     */
    public ReportQuery() throws ReportException {
        this.results = new ResultColumnList(this);
        this.inputs = new  InputList(this);
        this.subReports = new SubReportList(this);
        this.tableFormats = new TableFormatList();
        this.rowCount = new RowCount();
        this.version = ReportFactory.getActualVersion();
View Full Code Here

            }
        };
        subReports = new SubReportList(this, root, subReportContext);

        cores = new CoresList(this, root, getReportContext(ar));
        results = new ResultColumnList(this, root, getUnionContext(ar));
        tableFormats = new TableFormatList(root, getContext3Stage(ar));

        for(Atom atom:atoms) {
            atom.refresh();
        }
View Full Code Here

    }// </editor-fold>//GEN-END:initComponents

    private void addResultColBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addResultColBtnActionPerformed
        try {
            ReportResultColumn exp = new ReportResultColumn(query.getUnionContext(new NoNeedAtom()));
            ResultColumnList cols = query.getColumns();
            cols.add(exp);

            resultColTable.setModel(new ResultsTableModel(cols));

            resultColTable.getColumnModel().getColumn(ResultsTableModel.COL_CLASS)
                    .setCellEditor(new ResultTableClassEditor());
View Full Code Here

        }
}//GEN-LAST:event_addResultColBtnActionPerformed

    private void delResultColBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_delResultColBtnActionPerformed
        try {
            ResultColumnList fields = query.getColumns();
            ListSelectionModel model = resultColTable.getSelectionModel();
            int index = model.getLeadSelectionIndex();
            if(index != -1) {
                fields.remove(index);
                resultColTable.updateUI();
                if(index >= fields.size()) {
                    index = fields.size()-1;
                }
                if(index >= 0) {
                    model.setSelectionInterval(index, index);
                    delResultColBtn.setEnabled(true);
                } else {
View Full Code Here

                QCore core = cores.get(i);
                if(core.getColumns().size() != cols.size()) {
                    throw new ReportException("Выборки отличаются количеством результатов");
                }
            }
            ResultColumnList results = query.getColumns();
            for(int j=0; j<cols.size(); j++) {
                QueryResultColumn col = cols.get(j);
                if(results.size() <= j) {
                    ReportResultColumn result = new ReportResultColumn(query.getUnionContext(new NoNeedAtom()));
                    result.setColClass(col.getCls());
                    result.setTitle(col.getColTitle());
                    results.add(result);
                } else {
                    ReportResultColumn result = results.get(j);
                    Class colClass = col.getCls();
                    Class resClass = result.getCls();
                    if(colClass != null &&
                            (resClass == null || !colClass.equals(resClass))) {
                        int res = JOptionPane.showConfirmDialog(this, "Класс результата №" + j
View Full Code Here

TOP

Related Classes of reportgen.ren.report.items.ResultColumnList

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.