Ejemplo n.º 1
0
        /// <summary>
        /// todoComment
        /// </summary>
        /// <param name="cur2"></param>
        /// <param name="order"></param>
        /// <returns></returns>
        protected TRptLowerLevel ParseLowerLevel(XmlNode cur2, int order)
        {
            XmlNode        cur;
            Object         rg;
            TRptLowerLevel element;

            cur                    = cur2;
            element                = new TRptLowerLevel(order);
            element.strLevel       = GetAttribute(cur, "level");
            element.strCalculation = GetAttribute(cur, "calculation");
            element.strCondition   = GetAttribute(cur, "condition");
            cur                    = NextNotBlank(cur.FirstChild);
            rg = ParseGroup(cur, ref report.parametersId, "parameter", out cur);

            if (rg != null)
            {
                element.rptGrpParameter = ((List <TRptParameter>)rg);
            }

            return(element);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// todoComment
        /// </summary>
        /// <param name="cur2"></param>
        /// <param name="order"></param>
        /// <returns></returns>
        protected TRptLowerLevel ParseLowerLevel(XmlNode cur2, int order)
        {
            XmlNode cur;
            Object rg;
            TRptLowerLevel element;

            cur = cur2;
            element = new TRptLowerLevel(order);
            element.strLevel = GetAttribute(cur, "level");
            element.strCalculation = GetAttribute(cur, "calculation");
            element.strCondition = GetAttribute(cur, "condition");
            cur = NextNotBlank(cur.FirstChild);
            rg = ParseGroup(cur, ref report.parametersId, "parameter", out cur);

            if (rg != null)
            {
                element.rptGrpParameter = ((List <TRptParameter> )rg);
            }

            return element;
        }
Ejemplo n.º 3
0
        /// <summary>
        /// calculate the next level deeper
        /// </summary>
        /// <param name="rptLowerLevel"></param>
        /// <param name="masterRow"></param>
        public void Calculate(TRptLowerLevel rptLowerLevel, int masterRow)
        {
            TRptDataCalcLevel rptDataCalcLevel;
            TRptCalculation rptCalculation;
            TRptDataCalcCalculation rptDataCalcCalculation;
            TRptDataCalcParameter rptDataCalcParameter;

            if (!EvaluateCondition(rptLowerLevel.strCondition))
            {
                return;
            }

            if (rptLowerLevel.rptGrpParameter != null)
            {
                rptDataCalcParameter = new TRptDataCalcParameter(this);
                rptDataCalcParameter.Calculate("", rptLowerLevel.rptGrpParameter);
            }

            if (rptLowerLevel.strCalculation.Length == 0)
            {
                rptDataCalcLevel = new TRptDataCalcLevel(this);
                rptDataCalcLevel.Depth++;
                rptDataCalcLevel.Calculate(CurrentReport.GetLevel(rptLowerLevel.strLevel), masterRow);
            }
            else
            {
                rptCalculation = ReportStore.GetCalculation(CurrentReport, rptLowerLevel.strCalculation);

                if (rptCalculation == null)
                {
                    TLogging.Log("calculation not found:" + rptLowerLevel.strCalculation);
                    return;
                }

                rptDataCalcCalculation = new TRptDataCalcCalculation(this);

                rptDataCalcCalculation.EvaluateCalculation(rptCalculation, rptLowerLevel.rptGrpParameter, rptLowerLevel.strLevel, masterRow);
            }
        }