count() public method

public count ( ) : int
return int
Ejemplo n.º 1
0
        private void pSetIndexColInGroupFormulasAux(cReportSections sections, List<object[]> recordsets)
        {
            cReportSection sec = null;
            cReportSectionLine secLn = null;
            cReportControl ctrl = null;

            for (int _i = 0; _i < sections.count(); _i++)
            {
                sec = sections.item(_i);
                if (sec.getHasFormulaHide())
                {
                    pSetIndexColInGroupFormula(sec.getFormulaHide(), recordsets);
                }
                for (int _j = 0; _j < sec.getSectionLines().count(); _j++)
                {
                    secLn = sec.getSectionLines().item(_j);
                    if (secLn.getHasFormulaHide())
                    {
                        pSetIndexColInGroupFormula(secLn.getFormulaHide(), recordsets);
                    }
                    for (int _k = 0; _k < secLn.getControls().count(); _k++)
                    {
                        ctrl = secLn.getControls().item(_k);
                        if (ctrl.getHasFormulaHide())
                        {
                            pSetIndexColInGroupFormula(ctrl.getFormulaHide(), recordsets);
                        }
                        if (ctrl.getHasFormulaValue())
                        {
                            pSetIndexColInGroupFormula(ctrl.getFormulaValue(), recordsets);
                        }
                    }
                }
            }
        }
Ejemplo n.º 2
0
        private void pSortControlsByLeftAux1(cReportSections sections)
        {
            cReportSection sec = null;
            cReportSectionLine secLn = null;

            for (int _i = 0; _i < sections.count(); _i++)
            {
                sec = sections.item(_i);
                for (int _j = 0; _j < sec.getSectionLines().count(); _j++)
                {
                    secLn = sec.getSectionLines().item(_j);
                    secLn.getControls().orderCollByLeft();
                }
            }
        }
Ejemplo n.º 3
0
        private void pDestroyCrossRef(cReportSections secs)
        {
            cReportSection sec = null;
            cReportSectionLine secl = null;

            for (int _i = 0; _i < secs.count(); _i++)
            {
                sec = secs.item(_i);
                for (int _j = 0; _j < sec.getSectionLines().count(); _j++)
                {
                    secl = sec.getSectionLines().item(_j);
                    secl.getControls().setSectionLine(null);

                    if (secl.getControls().getCopyColl() != null)
                    {
                        secl.getControls().getCopyColl().clear();
                    }
                    secl.getControls().setCopyColl(null);
                    secl.getControls().clear();
                    secl.setControls(null);
                }
                sec.setCopyColl(null);
            }
            secs.setCopyColl(null);
        }
Ejemplo n.º 4
0
        private void sortCollectionAux(cReportSections col)
        {
            cReportSection sec = null;
            cReportSectionLine secLn = null;

            for (int _i = 0; _i < col.count(); _i++)
            {
                sec = col.item(_i);
                for (int _j = 0; _j < sec.getSectionLines().count(); _j++)
                {
                    secLn = sec.getSectionLines().item(_j);
                    secLn.setControls(getControlsInZOrder(secLn.getControls()));
                }
            }
        }
Ejemplo n.º 5
0
        private void addFieldToNewPage(cReportSections sections, cReportPage page, int where)
        { // TODO: Use of ByRef founded Private Sub AddFieldToNewPage(ByRef Sections As cReportSections, ByRef Page As cReportPage, ByVal Where As Long)
            cReportPageField field = null;
            cReportSection sec = null;
            cReportSectionLine secline = null;
            cReportControl ctrl = null;
            bool isVisible = false;
            int indexCtrl = 0;
            float offset = 0;
            int recordCount = 0;

            if (m_rows != null)
            {
                recordCount = m_vRowsIndex.Length;
            }

            // this indexes means
            //
            // in which datasource is this control
            //
            int indexRows = 0;
            // in which row of the datasource is the control
            //
            int indexRow = 0;
            int indexField = 0;

            for (int _i = 0; _i < sections.count(); _i++)
            {
                sec = sections.item(_i);
                m_lineIndex = m_lineIndex + 1;

                if (sec.getHasFormulaHide())
                {
                    isVisible = cUtil.val(m_compiler.resultFunction(sec.getFormulaHide())) != 0;
                }
                else
                {
                    isVisible = true;
                }
                if (isVisible)
                {
                    for (int _j = 0; _j < sec.getSectionLines().count(); _j++)
                    {
                        secline = sec.getSectionLines().item(_j);
                        if (secline.getHasFormulaHide())
                        {
                            isVisible = cUtil.val(m_compiler.resultFunction(secline.getFormulaHide())) != 0;
                        }
                        else
                        {
                            isVisible = true;
                        }
                        if (isVisible)
                        {
                            // For Each Ctrl In Secline.Controls
                            //
                            for (indexCtrl = 0; indexCtrl < secline.getControls().getCollByLeft().Length; indexCtrl++)
                            {
                                ctrl = secline.getControls().item(secline.getControls().getCollByLeft()[indexCtrl]);

                                if (where == C_HEADERS)
                                {
                                    field = page.getHeader().add(null, "");
                                }
                                else if (where == C_FOOTERS)
                                {
                                    field = page.getFooter().add(null, "");
                                }

                                field.setIndexLine(m_lineIndex);

                                if (ctrl.getHasFormulaValue())
                                {
                                    field.setValue(
                                        cReportGlobals.format(
                                            m_compiler.resultFunction(ctrl.getFormulaValue()), 
                                            ctrl.getLabel().getAspect().getFormat()));
                                }
                                else
                                {
                                    switch (ctrl.getControlType())
                                    {
                                        case csRptControlType.CSRPTCTFIELD:

                                            pGetIndexRows(out indexRows, out indexRow, out indexField, ctrl);

                                            if (m_collRows[indexRows] != null)
                                            {
                                                // it looks ugly, dont think you?
                                                //
                                                // maybe this help a litle:
                                                //
                                                //    m_vCollRows(IndexRows)    a matrix with the data 
                                                //                              contained in the datasource
                                                //                              referd by this control
                                                //
                                                //    (IndexField, IndexRow)    a cell in this matrix
                                                //
                                                object value = m_collRows[indexRows].Rows[indexRow][indexField];
                                                field.setValue(
                                                    cReportGlobals.format(
                                                        cReportGlobals.valVariant(value),
                                                        ctrl.getLabel().getAspect().getFormat()));
                                            }
                                            break;

                                        case csRptControlType.CSRPTCTLABEL:
                                            field.setValue(
                                                cReportGlobals.format(
                                                    ctrl.getLabel().getText(), 
                                                    ctrl.getLabel().getAspect().getFormat()));
                                            break;

                                        case csRptControlType.CSRPTCTIMAGE:
                                            field.setValue(
                                                cReportGlobals.format(
                                                    ctrl.getLabel().getText(), 
                                                    ctrl.getLabel().getAspect().getFormat()));
                                            field.setImage(ctrl.getImage().getImage());
                                            break;

                                        case csRptControlType.CSRPTCTDBIMAGE:

                                            pGetIndexRows(out indexRows, out indexRow, out indexField, ctrl);

                                            if (m_collRows[indexRows] != null)
                                            {
                                                field.setImage(pGetImage(indexRows, indexField, indexRow));
                                            }
                                            break;

                                        case csRptControlType.CSRPTCTCHART:

                                            pGetIndexRows(out indexRows, out indexRow, out indexField, ctrl);
                                            field.setImage(pGetChartImage(indexRows, indexField, indexRow, ctrl));
                                            break;
                                    }
                                }

                                field.setInfo(m_pageSetting.item(ctrl.getKey()));
                                field.setTop(field.getInfo().getAspect().getTop() + offset);

                                if (ctrl.getHasFormulaHide())
                                {
                                    field.setVisible(
                                        cUtil.val(m_compiler.resultFunction(ctrl.getFormulaHide())) != 0);
                                }
                                else
                                {
                                    field.setVisible(true);
                                }
                            }
                        }
                    }
                }
                else
                {
                    if (where == C_HEADERS)
                    {
                        offset = offset - sec.getAspect().getHeight();
                    }
                    else if (where == C_FOOTERS)
                    {
                        offset = offset + sec.getAspect().getHeight();
                    }
                }
            }
        }
Ejemplo n.º 6
0
        private bool pAddFormulasInSection(cReportSections sections)
        { // TODO: Use of ByRef founded Private Function pAddFormulasInSection(ByRef Sections As cReportSections) As Boolean
            cReportSection sec = null;
            cReportSectionLine secLn = null;

            for (int _i = 0; _i < sections.count(); _i++)
            {
                sec = sections.item(_i);
                if (sec.getHasFormulaHide())
                {
                    if (!m_compiler.checkSyntax(sec.getFormulaHide())) 
                    { 
                        return false; 
                    }
                    // to have debug info
                    //
                    sec.getFormulaHide().setSectionName(sec.getName());

                    // add the formula to the formulas collection
                    //
                    addFormula(sec.getFormulaHide(), sec.getName() + "_" + "H");
                }
                for (int _j = 0; _j < sec.getSectionLines().count(); _j++)
                {
                    secLn = sec.getSectionLines().item(_j);
                    if (secLn.getHasFormulaHide())
                    {
                        if (!m_compiler.checkSyntax(secLn.getFormulaHide())) 
                        { 
                            return false; 
                        }
                        // to have debug info
                        //
                        secLn.getFormulaHide().setSectionName(secLn.getSectionName());
                        secLn.getFormulaHide().setSectionLineIndex(secLn.getIndex());

                        // add the formula to the formulas collection
                        //
                        addFormula(secLn.getFormulaHide(), sec.getName() 
                                    + "_R_" + secLn.getIndex().ToString() + "_" + "H");
                    }
                }
            }
            return true;
        }
Ejemplo n.º 7
0
        private void pSetIndexGroupInFormulaGroups(cReportSections sections)
        { // TODO: Use of ByRef founded Private Function pSetIndexGroupInFormulaGroups(ByRef Sections As cReportSections) As Boolean
            cReportSection sec = null;
            cReportSectionLine secLn = null;
            cReportControl ctrl = null;

            for (int _i = 0; _i < sections.count(); _i++)
            {
                sec = sections.item(_i);
                if (sec.getHasFormulaHide())
                {
                    pSetFormulaIndexGroup(sec.getFormulaHide(), sec);
                }
                for (int _j = 0; _j < sec.getSectionLines().count(); _j++)
                {
                    secLn = sec.getSectionLines().item(_j);
                    if (secLn.getHasFormulaHide())
                    {
                        pSetFormulaIndexGroup(secLn.getFormulaHide(), sec);
                    }
                    for (int _k = 0; _k < secLn.getControls().count(); _k++)
                    {
                        ctrl = secLn.getControls().item(_k);
                        if (ctrl.getHasFormulaHide())
                        {
                            pSetFormulaIndexGroup(ctrl.getFormulaHide(), sec);
                        }
                        if (ctrl.getHasFormulaValue())
                        {
                            pSetFormulaIndexGroup(ctrl.getFormulaValue(), sec);
                        }
                    }
                }
            }
        }
Ejemplo n.º 8
0
        private void pSetGroupFormulaHF(cReportSections sections, int idxGrop)
        { // TODO: Use of ByRef founded Private Sub pSetGroupFormulaHF(ByRef Sections As cReportSections, ByVal IdxGrop As Integer)
            cReportSection sec = null;
            cReportSectionLine secLn = null;
            cReportControl ctrl = null;

            for (int _i = 0; _i < sections.count(); _i++)
            {
                sec = sections.item(_i);
                for (int _j = 0; _j < sec.getSectionLines().count(); _j++)
                {
                    secLn = sec.getSectionLines().item(_j);
                    for (int _k = 0; _k < secLn.getControls().count(); _k++)
                    {
                        ctrl = secLn.getControls().item(_k);
                        if (ctrl.getHasFormulaHide())
                        {
                            if (ctrl.getFormulaHide().getIdxGroup() == 0)
                            {
                                ctrl.getFormulaHide().setIdxGroup(idxGrop);
                            }
                        }
                        if (ctrl.getHasFormulaValue())
                        {
                            if (ctrl.getFormulaValue().getIdxGroup() == 0)
                            {
                                ctrl.getFormulaValue().setIdxGroup(idxGrop);
                            }
                        }
                    }
                }
            }
        }