Beispiel #1
0
        public static string CalculateReportFile(string reportStyle, RdDocument.GtReportPubGetValue onUnknownFunctionAndVariable)
        {
            string     result = string.Empty;
            RdDocument doc    = new RdDocument();

            doc.OnGtReportPubGetValue += onUnknownFunctionAndVariable;
            doc.SetReport(reportStyle);
            doc.ShowFormula = false;
            doc.ReCalcDoc();
            return(doc.GetReport());
        }
Beispiel #2
0
        public static string ReportDifference(string reportXml, string priorReportXml)
        {
            string     result     = string.Empty;
            RdDocument repPrior   = new RdDocument();
            RdDocument repCurrent = new RdDocument();

            repPrior.SetReport(priorReportXml);
            repCurrent.SetReport(reportXml);
            for (int rowIndex = 1; rowIndex <= repCurrent.Rows.RowCount; rowIndex++)
            {
                for (int columnIndex = 1; columnIndex <= repCurrent.Columns.ColumnCount; columnIndex++)
                {
                    RdCell cellPrior   = repPrior.GetCell(rowIndex, columnIndex);
                    RdCell cellCurrent = repCurrent.GetCell(rowIndex, columnIndex);
                    bool   flag        = cellPrior == null || cellPrior.GetAsString() != cellCurrent.GetAsString();
                    if (flag)
                    {
                        cellCurrent.SetColor(Color.Red);
                    }
                }
            }
            return(repCurrent.GetReport());
        }