Report Generator in C#

This is a library which is intended to make report generation easier. This is written in C#. Currently it provides report generation only in HTML.

 

Note:- It will be extended to other formats shortly.

 

How to use GenerateReports.DLL:-

GenerateReports.DLL contains 3 main functions for generating reports in HTML format. They are:
1) CreateReportHTML()
2)AppendReportHTML(String sFunctionName,String sFuncParams, String sStatus, String sMessage)
3) CloseReportHTML()

The variable used to specify the filename is: sReportName

The following example shows how to access the variable and functions present in this DLL.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GenerateReports;
namespace ConsoleApplication3
{
    class Program
    {
      
        public static void AddTwoNumbers(int one,int two)
        {
            GenerateReports.Report.AppendReportHTML("AddTwoNumbers", Convert.ToString(one)+","+Convert.ToString(two), "Pass", "Entering the function");
            GenerateReports.Report.AppendReportHTML("AddTwoNumbers", Convert.ToString(one) + "," + Convert.ToString(two), "Pass", "Executed without any errors");
            GenerateReports.Report.AppendReportHTML("AddTwoNumbers", Convert.ToString(one) + "," + Convert.ToString(two), "Pass", "Leaving the function");

        }
        static void Main(string[] args)
        {
          
            GenerateReports.Report.sReportName = @"D:\ReportGeneration.html";          
            GenerateReports.Report.CreateReportHTML();
            AddTwoNumbers(100,200);
            GenerateReports.Report.CloseReportHTML();
        }
    }
}


Last edited Oct 16, 2012 at 11:09 AM by suhasbhairav, version 2