public override TableDefinition Content(ReportData reportData, Dictionary <string, string> options)
        {
            int           nbRows = 0;
            int           nbLimitTop;
            List <string> rowData = new List <string>();

            rowData.AddRange(new[] {
                Labels.RuleName,
                Labels.ViolationsCount
            });

            int?metricId = ((options != null && options.ContainsKey("BC-ID")) ? int.Parse(options["BC-ID"]) : (int?)null) ?? ((options != null && options.ContainsKey("PAR")) ? int.Parse(options["PAR"]) : (int?)null);

            if (options == null || !options.ContainsKey("COUNT") || !int.TryParse(options["COUNT"], out nbLimitTop))
            {
                nbLimitTop = reportData.Parameter.NbResultDefault;
            }

            if (reportData?.CurrentSnapshot != null)
            {
                if (!metricId.HasValue)
                {
                    metricId = 0;
                }

                var _nonCriticalRulesViolation = RulesViolationUtility.GetRuleViolations(reportData.CurrentSnapshot,
                                                                                         Constants.RulesViolation.NonCriticalRulesViolation,
                                                                                         (Constants.BusinessCriteria)metricId,
                                                                                         true,
                                                                                         nbLimitTop);


                if (_nonCriticalRulesViolation != null && _nonCriticalRulesViolation.Any())
                {
                    foreach (var elt in _nonCriticalRulesViolation)
                    {
                        rowData.AddRange(new[] { elt.Rule.Name, elt.TotalFailed?.ToString("N0") });
                    }
                }
                else
                {
                    rowData.AddRange(new[] {
                        Labels.NoItem,
                        string.Empty
                    });
                }
                if (_nonCriticalRulesViolation != null)
                {
                    nbRows = _nonCriticalRulesViolation.Count;
                }
            }

            TableDefinition resultTable = new TableDefinition {
                HasRowHeaders    = false,
                HasColumnHeaders = true,
                NbRows           = nbRows + 1,
                NbColumns        = 2,
                Data             = rowData
            };

            return(resultTable);
        }
        protected override TableDefinition Content(ReportData reportData, Dictionary <string, string> options)
        {
            List <string> rowData = new List <string>();

            rowData.AddRange(new string[] {
                Labels.RuleName,
                Labels.ViolationsCount
            });

            int   nbRows     = 0;
            int   nbLimitTop = 0;
            Int32?metricId   = (options != null && options.ContainsKey("BC-ID")) ? Convert.ToInt32(options["BC-ID"]) : (Int32?)null;

            if (metricId == null)
            {
                metricId = (options != null && options.ContainsKey("PAR")) ? Convert.ToInt32(options["PAR"]) : (Int32?)null;
            }

            if (null == options || !options.ContainsKey("COUNT") || !Int32.TryParse(options["COUNT"], out nbLimitTop))
            {
                nbLimitTop = reportData.Parameter.NbResultDefault;
            }

            if (reportData != null && reportData.CurrentSnapshot != null)
            {
                if (!metricId.HasValue)
                {
                    metricId = 0;
                }

                var rulesViolation = RulesViolationUtility.GetRuleViolations(reportData.CurrentSnapshot,
                                                                             Constants.RulesViolation.CriticalRulesViolation,
                                                                             (Constants.BusinessCriteria)metricId,
                                                                             true,
                                                                             nbLimitTop);


                if (null != rulesViolation)
                {
                    foreach (var elt in rulesViolation)
                    {
                        rowData.AddRange(new string[] {
                            elt.Rule.Name,
                            elt.TotalFailed.Value.ToString("N0")
                        });
                    }
                }
                else
                {
                    rowData.AddRange(new string[] {
                        Labels.NoItem,
                        string.Empty
                    });
                }
                nbRows = rulesViolation.Count;
            }


            TableDefinition resultTable = new TableDefinition {
                HasRowHeaders    = false,
                HasColumnHeaders = true,
                NbRows           = nbRows + 1,
                NbColumns        = 2,
                Data             = rowData
            };

            return(resultTable);
        }