Package reportgen.ren.report.extendedformat.range.cross

Examples of reportgen.ren.report.extendedformat.range.cross.CrossReport


            for(Object iReport: subreports) {
                crossReportCombo.addItem(iReport);
            }
        }
        //set default
        CrossReport localReport = range.getCrossReport();
        if(localReport != null) {
            crossReportCombo.setSelectedItem(localReport.getSubReport());
        } else {
            crossReportCombo.setSelectedItem(NOTUSED);
        }

        crossReportCombo.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                Object selValue = crossReportCombo.getSelectedItem();
                if(selValue == NOTUSED) {
                    selValue = null;
                }
                QueryExecuterSub newValue = (QueryExecuterSub) selValue;
                QueryExecuterSub oldValue = range.getCrossReport() == null
                        ? null : range.getCrossReport().getSubReport();
                if(oldValue == newValue
                        || (oldValue != null && oldValue.equals(newValue))) {
                    return;
                }
                if(oldValue != null && !range.canRemoveCrossReport(range.getCrossReport())) {
                    crossReportCombo.setSelectedItem(oldValue);
                    Message.warning(parent, "Кросс-отчет иcпользуется и не может быть сменен");
                } else {
                    range.setCrossReport(new CrossReport(newValue));
                    initCriteriaPanel();
                }
            }
        });
    }
View Full Code Here



    @Override
    protected Map getLocalModel() throws ReportException {
        HashMap<CrossReportColumn, Object> model = new HashMap<CrossReportColumn, Object>();
        CrossReport crossReport = range.getCrossReport();
        for(int i=0; i<crossReport.getColumnCount(); i++) {
            CrossReportColumn column = new CrossReportColumn(crossReport, i);
            model.put(column, crossReport.getSubReport().getColValue(i, rowIndex));
        }
        return model;
    }
View Full Code Here

    }

    public MathExpressionCrossReportColumnRef(Element element,
            Context context) throws ReportException {
        super(element, context);
        CrossReport crossReport = context.getCrossReport(new Atom(getStringAttribute(element, CROSSID)));

        String columnName  = element.getText();
        int index = crossReport.getSubReport().getColumnIndex(columnName);
        column = new CrossReportColumn(crossReport, index);
    }
View Full Code Here

TOP

Related Classes of reportgen.ren.report.extendedformat.range.cross.CrossReport

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.