clear() публичный Метод

public clear ( ) : void
Результат void
Пример #1
0
        internal bool load(CSXml.cXml xDoc, XmlNode nodeObj)
        {
            XmlNode nodeObjSecLn = null;

            m_pageNumber   = xDoc.getNodeProperty(nodeObj, "PageNumber").getValueInt(eTypes.eInteger);
            m_headerBottom = xDoc.getNodeProperty(nodeObj, "HeaderBottom").getValueInt(eTypes.eLong);
            m_footerTop    = xDoc.getNodeProperty(nodeObj, "FooterTop").getValueInt(eTypes.eLong);

            m_header.clear();
            m_detail.clear();
            m_footer.clear();

            nodeObj = xDoc.getNodeFromNode(nodeObj, C_NODERPTHEADER);
            if (xDoc.nodeHasChild(nodeObj))
            {
                nodeObjSecLn = xDoc.getNodeChild(nodeObj);
                while (nodeObjSecLn != null)
                {
                    if (!m_header.add(null).load(xDoc, nodeObjSecLn))
                    {
                        return(false);
                    }
                    nodeObjSecLn = xDoc.getNextNode(nodeObjSecLn);
                }
            }

            nodeObj = xDoc.getNodeFromNode(nodeObj, C_NODERPTDETAIL);
            if (xDoc.nodeHasChild(nodeObj))
            {
                nodeObjSecLn = xDoc.getNodeChild(nodeObj);
                while (nodeObjSecLn != null)
                {
                    if (!m_detail.add(null).load(xDoc, nodeObjSecLn))
                    {
                        return(false);
                    }
                    nodeObjSecLn = xDoc.getNextNode(nodeObjSecLn);
                }
            }

            nodeObj = xDoc.getNodeFromNode(nodeObj, C_NODERPTFOOTER);
            if (xDoc.nodeHasChild(nodeObj))
            {
                nodeObjSecLn = xDoc.getNodeChild(nodeObj);
                while (nodeObjSecLn != null)
                {
                    if (!m_footer.add(null).load(xDoc, nodeObjSecLn))
                    {
                        return(false);
                    }
                    nodeObjSecLn = xDoc.getNextNode(nodeObjSecLn);
                }
            }

            return(true);
        }
Пример #2
0
        // it returns every controls of a line
        // it moves through every row in the main recordset
        //
        public csRptGetLineResult getLine(ref cReportPageFields fields)
        {
            // to know if we need to print in a new page
            // because a group has changed its value
            //
            bool bGetNewPage = false;

            if (fields != null)
            {
                fields.clear();
            }

            // if there are not pending calls to close or open groups
            //
            if (!(m_bCloseFooter || m_bOpenHeader))
            {

                // if there are not group headers to be re-printed in this page
                //
                if (!pExistsGroupHeadersToReprint())
                {

                    // we process the line
                    //
                    csRptGetLineResult rslt = pGetLineWork(ref fields, out bGetNewPage);
                    if (bGetNewPage)
                    {
                        return csRptGetLineResult.CSRPTGLNEWPAGE;
                    }
                    else
                    {
                        if (rslt == csRptGetLineResult.CSRPTGLEND || rslt == csRptGetLineResult.CSRPTGLVIRTUALF)
                        {
                            return rslt;
                        }
                    }
                }
            }

            // if we must close footers
            //
            if (m_bCloseFooter)
            {
                return pGetLineAuxGroupFooter(fields);
            }
            // if the group has changed
            //
            else if (m_bOpenHeader)
            {
                return pGetLineAuxGroupHeader(bGetNewPage, fields);
            }
            // process a details line
            //
            else
            {
                return pGetLineAuxDetail(fields);
            }
        }