Esempio n. 1
0
        public static string RenderToHtml(ReportResult result, string outputPath, string transform, string nameFormat)
        {
            if (result == null)
            {
                throw new ArgumentNullException("result");
            }
            if (nameFormat == null)
            {
                throw new ArgumentNullException("nameFormat");
            }
            if (nameFormat.Length == 0)
            {
                throw new ArgumentException("Length is zero", "nameFormat");
            }

            HtmlReport htmlReport = new HtmlReport();

            if (transform != null)
            {
                if (!File.Exists(transform))
                {
                    throw new ArgumentException("Transform does not exist.", "transform");
                }
                XslTransform xsl = new XslTransform();
                xsl.Load(transform);
                htmlReport.Transform = xsl;
            }
            ResourceHelper.CreateImages(outputPath);
            return(htmlReport.Render(result, outputPath, nameFormat));
        }
Esempio n. 2
0
        public static string RenderToHtml(ReportResult result)
        {
            if (result == null)
                throw new ArgumentNullException("result");

            HtmlReport htmlReport = new HtmlReport();
            ResourceHelper.CreateImages(GetAppDataPath(""));
            return htmlReport.Render(result);
        }
Esempio n. 3
0
        public static string RenderToHtml(ReportResult result)
        {
            if (result == null)
            {
                throw new ArgumentNullException("result");
            }

            HtmlReport htmlReport = new HtmlReport();

            ResourceHelper.CreateImages(GetAppDataPath(""));
            return(htmlReport.Render(result));
        }
Esempio n. 4
0
        public static string RenderToHtml(ReportResult result, string outputPath, string nameFormat)
        {
            if (result == null)
                throw new ArgumentNullException("result");
            if (nameFormat == null)
                throw new ArgumentNullException("nameFormat");
            if (nameFormat.Length == 0)
                throw new ArgumentException("Length is zero", "nameFormat");

            HtmlReport htmlReport = new HtmlReport();

            outputPath = GetAppDataPath(outputPath);

            ResourceHelper.CreateImages(outputPath);

            return htmlReport.Render(result, outputPath, nameFormat);
        }
Esempio n. 5
0
        public static string RenderToHtml(ReportResult result, string outputPath, string transform, string nameFormat)
        {
            if (result == null)
                throw new ArgumentNullException("result");
            if (nameFormat == null)
                throw new ArgumentNullException("nameFormat");
            if (nameFormat.Length == 0)
                throw new ArgumentException("Length is zero", "nameFormat");

            HtmlReport htmlReport = new HtmlReport();
            if (transform != null)
            {
                if (!File.Exists(transform))
                    throw new ArgumentException("Transform does not exist.", "transform");
                XslTransform xsl = new XslTransform();
                xsl.Load(transform);
                htmlReport.Transform = xsl;
            }
            ResourceHelper.CreateImages(outputPath);
            return htmlReport.Render(result, outputPath, nameFormat);
        }