Exemple #1
0
        /// <summary>
        /// add a report
        /// </summary>
        /// <param name="reportId"></param>
        /// <returns></returns>
        public TReportDefinition Add(string reportId)
        {
            TReportDefinition element;

            Clear(reportId);
            element = new TReportDefinition(reportId);
            reports.Add(element);
            return(element);
        }
Exemple #2
0
        /// <summary>
        /// specific for reports
        /// </summary>
        /// <returns>void</returns>
        protected Object ParseReport(XmlNode cur2)
        {
            XmlNode cur;
            int     dummy = -1;
            Object  rg;

            cur      = cur2;
            reportId = GetAttribute(cur, "id");
            report   = myStore.Add(reportId);
            cur      = NextNotBlank(cur.FirstChild);
            Parse(cur, ref dummy, "description");
            cur = GetNextEntity(cur);
            Parse("reportparameters", ref cur, ref report.reportParametersId, "reportparameter");

            if (cur.Name == "reportheader")
            {
                ParseFooterHeader(NextNotBlank(cur.FirstChild), out report.rptReport.reportfield, out report.rptReport.reportswitch);
                cur = GetNextEntity(cur);
            }

            if (cur.Name == "pageheader")
            {
                ParseFooterHeader(NextNotBlank(cur.FirstChild), out report.rptReport.pagefield, out report.rptReport.pageswitch);
                cur = GetNextEntity(cur);
            }

            if (cur.Name == "detailreports")
            {
                rg = ParseGroup(cur.FirstChild, ref report.detailReportsId, "detailreport");

                if (rg != null)
                {
                    report.rptReport.rptGrpDetailReport = (List <TRptDetailReport>)rg;
                }

                cur = GetNextEntity(cur);
            }

            rg = ParseGroup(cur.FirstChild, ref report.calculationsId, "calculation");

            if (rg != null)
            {
                report.rptReport.rptGrpCalculation = (List <TRptCalculation>)rg;
            }

            cur = GetNextEntity(cur);
            rg  = ParseGroup(cur.FirstChild, ref report.levelsId, "level");

            if (rg != null)
            {
                report.rptReport.rptGrpLevel = (List <TRptLevel>)rg;
            }

            return(report.rptReport);
        }
Exemple #3
0
        /// <summary>
        /// clear any reports with this id
        /// </summary>
        /// <param name="reportId"></param>
        public void Clear(string reportId)
        {
            for (int counter = 0; counter < reports.Count; counter++)
            {
                TReportDefinition element = (TReportDefinition)reports[counter];

                if (element.id == reportId)
                {
                    reports.RemoveAt(counter);
                }
            }
        }
Exemple #4
0
        /// <summary>
        /// todoComment
        /// </summary>
        /// <param name="reportId"></param>
        /// <returns></returns>
        public TRptReport Get(string reportId)
        {
            for (int counter = 0; counter < reports.Count; counter++)
            {
                TReportDefinition element = (TReportDefinition)reports[counter];

                if (element.id == reportId)
                {
                    return(element.GetReport());
                }
            }

            return(null);
        }
Exemple #5
0
        /// <summary>
        /// specific for reports
        /// </summary>
        /// <returns>void</returns>
        protected Object ParseReport(XmlNode cur2)
        {
            XmlNode cur;
            int dummy = -1;
            Object rg;

            cur = cur2;
            reportId = GetAttribute(cur, "id");
            report = myStore.Add(reportId);
            cur = NextNotBlank(cur.FirstChild);
            Parse(cur, ref dummy, "description");
            cur = GetNextEntity(cur);
            Parse("reportparameters", ref cur, ref report.reportParametersId, "reportparameter");

            if (cur.Name == "reportheader")
            {
                ParseFooterHeader(NextNotBlank(cur.FirstChild), out report.rptReport.reportfield, out report.rptReport.reportswitch);
                cur = GetNextEntity(cur);
            }

            if (cur.Name == "pageheader")
            {
                ParseFooterHeader(NextNotBlank(cur.FirstChild), out report.rptReport.pagefield, out report.rptReport.pageswitch);
                cur = GetNextEntity(cur);
            }

            if (cur.Name == "detailreports")
            {
                rg = ParseGroup(cur.FirstChild, ref report.detailReportsId, "detailreport");

                if (rg != null)
                {
                    report.rptReport.rptGrpDetailReport = (List <TRptDetailReport> )rg;
                }

                cur = GetNextEntity(cur);
            }

            rg = ParseGroup(cur.FirstChild, ref report.calculationsId, "calculation");

            if (rg != null)
            {
                report.rptReport.rptGrpCalculation = (List <TRptCalculation> )rg;
            }

            cur = GetNextEntity(cur);
            rg = ParseGroup(cur.FirstChild, ref report.levelsId, "level");

            if (rg != null)
            {
                report.rptReport.rptGrpLevel = (List <TRptLevel> )rg;
            }

            return report.rptReport;
        }
Exemple #6
0
        /// <summary>
        /// add a report
        /// </summary>
        /// <param name="reportId"></param>
        /// <returns></returns>
        public TReportDefinition Add(string reportId)
        {
            TReportDefinition element;

            Clear(reportId);
            element = new TReportDefinition(reportId);
            reports.Add(element);
            return element;
        }