public override ExcelPackage ExecuteXlsx(OperationPackage package, string reportName, bool useAllSets = false)
        {
            var pack = new ExcelPackage();

            var packageContent = PackageParser.GetPackageValues(package);

            if (useAllSets)
            {
                for (int i = 0; i < packageContent.Count; i++)
                {
                    if (packageContent[i].GroupColumns != null)
                    {
                        AddDataSetToExcel(pack, packageContent[i]);
                    }
                    else
                    {
                        base.AddDataSetToExcel(pack, packageContent[i]);
                    }

                    if (pack.Workbook.Worksheets[i + 1].Name == "NoNamedList")
                    {
                        pack.Workbook.Worksheets[i + 1].Name = $"Dataset{i + 1}";
                    }
                }
            }

            else
            {
                AddDataSetToExcel(pack, packageContent.First());
            }

            return(pack);
        }
        public override string ExecuteHtml(string tableName, OperationPackage package)
        {
            string date = $"{DateTime.Now:dd.MM.yy HH:mm:ss}";

            TemplateServiceConfiguration templateConfig =
                new TemplateServiceConfiguration
            {
                DisableTempFileLocking = true,
                CachingProvider        = new DefaultCachingProvider(t => { })
            };

            templateConfig.Namespaces
            .Add("ReportService.Operations.DataExporters.ViewExecutors");

            var serv = RazorEngineService.Create(templateConfig);

            if (!package.DataSets.Any())
            {
                return("No information obtained by query");
            }

            var packageValues = PackageParser.GetPackageValues(package);

            var dataSet = packageValues.First();

            var groupColumns = dataSet.GroupColumns;
            var grouping     = GetMergedRows(dataSet.Rows, groupColumns, groupColumns);
            var groupedT     = CreateGroupedHtmlTable(grouping);

            groupedT = groupedT.Replace("@", "&#64;"); //needed '@' symbol escaping for proper razorengine work

            string tableTemplate =
                @"<!DOCTYPE html>
<html>
<head>
<META http-equiv=""Content-Type"" content=""text/html; charset=utf-8"">
    <title>ReportServer</title>
    <link rel=""stylesheet"" href=""https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"">
    <style>
        table 
        {
            border-collapse: collapse;
            width: 80%;
        }

    th, td 
        {
            border: 1px solid Black;
            padding: 10px;
        }
    </style>
</head>
<body>"
                +
                $@"<h3 align=""center"">{tableName}</h3>"
                +
                @"<table class=""table table-bordered"">
<tr>
@foreach(var header in @Model.Headers)
{
    <th> @header </th>
}
</tr>"
                +
                groupedT
                +
                @"</table>
</body>
</html>";

            var headers = ChangeHeadersOrder(dataSet.Headers, groupColumns);

            var model = new
            {
                Headers = headers,
                Date    = date
            };

            Engine.Razor = serv;
            Engine.Razor.Compile(tableTemplate, "somekey");

            return(Engine.Razor.Run("somekey", null, model));
        }
        public override string ExecuteHtml(string tableName, OperationPackage package)
        {
            string date = $"{DateTime.Now:dd.MM.yy HH:mm:ss}";


            if (!package.DataSets.Any())
            {
                return("No information obtained by query");
            }

            var packageValues = PackageParser.GetPackageValues(package);

            var dataSet = packageValues.First();

            var groupColumns = dataSet.GroupColumns;
            var grouping     = GetMergedRows(dataSet.Rows, groupColumns, groupColumns);
            var groupedT     = CreateGroupedHtmlTable(grouping);

            groupedT = groupedT.Replace("@", "&#64;"); //needed '@' symbol escaping for proper razorengine work

            string tableTemplate =
                @"<!DOCTYPE html>
<html>
<head>
<META http-equiv=""Content-Type"" content=""text/html; charset=utf-8"">
    <title>ReportServer</title>
    <link rel=""stylesheet"" href=""https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"">
    <style>
        table 
        {
            border-collapse: collapse;
            width: 80%;
        }

    th, td 
        {
            border: 1px solid Black;
            padding: 10px;
        }
    </style>
</head>
<body>"
                +
                $@"<h3 align=""center"">{tableName}</h3>"
                +
                @"<table class=""table table-bordered"">
<tr>
@foreach(var header in @Model.Headers)
{
    <th> @header </th>
}
</tr>"
                +
                groupedT
                +
                @"</table>
</body>
</html>";

            var headers = ChangeHeadersOrder(dataSet.Headers, groupColumns);

            var model = new
            {
                Headers = headers,
                Date    = date
            };

            var engine = new RazorLightEngineBuilder()
                         .UseEmbeddedResourcesProject(typeof(Program))
                         .UseMemoryCachingProvider()
                         .Build();

            var result = engine.CompileRenderStringAsync("templateKey", tableTemplate, model).Result;

            return(result);
        }