EasyHTMLReports 1.0.0

Easy HTML Reports For Winforms

A light weight Winforms Library to Generate Awesome styled reports Using HTML and CSS

Install-Package EasyHTMLReports -Version 1.0.0
dotnet add package EasyHTMLReports --version 1.0.0
<PackageReference Include="EasyHTMLReports" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add EasyHTMLReports --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Easy HTML Reports

A light weight Winforms Library to Generate Awesome styled reports Using HTML and CSS

Tech

.Net Framework 4.0 and above

How to Use.

Find Easy HTML Reports on your toolbox and drop on your form.

Table Theme setup

You can customuze the colors from the Properties window (Or use default)

 Color HeaderGridColor
 Color HeaderBackgroundColor
 Color HeaderFontColor
 Color RowDefaultGridColor
 Color RowDefaultBackgroudColor
 Color RowDefaultFontColor
 Color AlternativeRowGridColor
 Color AlternativeRowGridColor

Methods

Preview document

  //Shows a Preview dialog of the document
   EasyHtmlReport.ShowPrintPreviewDialog();


Print directily to the printer

  //Prints to the printer with default settings
   EasyHtmlReport.Print();

Create a Blank Page

  //Reset the report to a blank page
  EasyHtmlReport.Clear();

Add New Line

   //Adds new line
   EasyHtmlReport.NewLine();
   //Adds 3  lines
   EasyHtmlReport.NewLine(3);

Add an horizontal line to the page

   //Adds horizontal line to the report
    EasyHtmlReport.AddHorizontalRule();
   //Add properties
    EasyHtmlReport.AddHorizontalRule("border-color: Red");

Print Text/Strings

  //Add string Text or Formated html Text to the report
   EasyHtmlReport.AddString("String");
   EasyHtmlReport.AddString("<p>HTML Here</p>");


Create Pages

    //Create Pages
     EasyHtmlReport.AddString("<H1>Page 1</H1>");
     EasyHtmlReport.NewPage();

     EasyHtmlReport.AddString("<H1>Page 2</H1>");
     EasyHtmlReport.NewPage();
     
     EasyHtmlReport.AddString("<H1>Page 3</H1>");
     EasyHtmlReport.NewPage();


Print Images

  //Add image to the document
   Image img = Image.FromFile("logo.png");
   EasyHtmlReport.AddImage(img);
   //You can pass css properties
   EasyHtmlReport.AddImage(img,"width='100%'");

[NOTE] All Items can attach CSS properties as parameters
Print List Items

   //Print Lists items
    EasyHtmlReport.AddList(
        new object[]
          {
             "Item 1",
             "Item 2",
             "Item 3"
           }  
     );
   //Print ordered List
     EasyHtmlReport.AddList(
       new object[]
              {
                  "Item 1",
                  "Item 2",
                  "Item 3"
              },
              KimToo.EasyHTMLReports.ListType.Ordered  
            );

Attach controls eg. Charts or styled components to your report

     //Add Other controls and it will be attahced as images
    EasyHtmlReport.AddControl(chartConrol);
    //With properties
     EasyHtmlReport.AddControl(chartConrol,"width='100%'");

Easy HTML Reports can also convert existing DatagridViews to Tables with pagings and headers per page

        //Convert Datagridview  to table
            EasyHtmlReport.AddDatagridView(dataGridView1);
            //attach all properties you want
            EasyHtmlReport.AddDatagridView(dataGridView1"width='100%' border=1'");

Easy HTML Reports can aloso convert Datatables to Tables with pagings and headers per page

        //Convert Datatables to table
        EasyHtmlReport.AddDataTable(dataGridView1);
        //attach all Datatables  you want
        EasyHtmlReport.AddDataTable(dataGridView1"width='100%' border=1'");

Todos

  • Write MORE Examples
  • Build For WPF

License

MIT

Free Software, Hell Yeah!

Easy HTML Reports

A light weight Winforms Library to Generate Awesome styled reports Using HTML and CSS

Tech

.Net Framework 4.0 and above

How to Use.

Find Easy HTML Reports on your toolbox and drop on your form.

Table Theme setup

You can customuze the colors from the Properties window (Or use default)

 Color HeaderGridColor
 Color HeaderBackgroundColor
 Color HeaderFontColor
 Color RowDefaultGridColor
 Color RowDefaultBackgroudColor
 Color RowDefaultFontColor
 Color AlternativeRowGridColor
 Color AlternativeRowGridColor

Methods

Preview document

  //Shows a Preview dialog of the document
   EasyHtmlReport.ShowPrintPreviewDialog();


Print directily to the printer

  //Prints to the printer with default settings
   EasyHtmlReport.Print();

Create a Blank Page

  //Reset the report to a blank page
  EasyHtmlReport.Clear();

Add New Line

   //Adds new line
   EasyHtmlReport.NewLine();
   //Adds 3  lines
   EasyHtmlReport.NewLine(3);

Add an horizontal line to the page

   //Adds horizontal line to the report
    EasyHtmlReport.AddHorizontalRule();
   //Add properties
    EasyHtmlReport.AddHorizontalRule("border-color: Red");

Print Text/Strings

  //Add string Text or Formated html Text to the report
   EasyHtmlReport.AddString("String");
   EasyHtmlReport.AddString("<p>HTML Here</p>");


Create Pages

    //Create Pages
     EasyHtmlReport.AddString("<H1>Page 1</H1>");
     EasyHtmlReport.NewPage();

     EasyHtmlReport.AddString("<H1>Page 2</H1>");
     EasyHtmlReport.NewPage();
     
     EasyHtmlReport.AddString("<H1>Page 3</H1>");
     EasyHtmlReport.NewPage();


Print Images

  //Add image to the document
   Image img = Image.FromFile("logo.png");
   EasyHtmlReport.AddImage(img);
   //You can pass css properties
   EasyHtmlReport.AddImage(img,"width='100%'");

[NOTE] All Items can attach CSS properties as parameters
Print List Items

   //Print Lists items
    EasyHtmlReport.AddList(
        new object[]
          {
             "Item 1",
             "Item 2",
             "Item 3"
           }  
     );
   //Print ordered List
     EasyHtmlReport.AddList(
       new object[]
              {
                  "Item 1",
                  "Item 2",
                  "Item 3"
              },
              KimToo.EasyHTMLReports.ListType.Ordered  
            );

Attach controls eg. Charts or styled components to your report

     //Add Other controls and it will be attahced as images
    EasyHtmlReport.AddControl(chartConrol);
    //With properties
     EasyHtmlReport.AddControl(chartConrol,"width='100%'");

Easy HTML Reports can also convert existing DatagridViews to Tables with pagings and headers per page

        //Convert Datagridview  to table
            EasyHtmlReport.AddDatagridView(dataGridView1);
            //attach all properties you want
            EasyHtmlReport.AddDatagridView(dataGridView1"width='100%' border=1'");

Easy HTML Reports can aloso convert Datatables to Tables with pagings and headers per page

        //Convert Datatables to table
        EasyHtmlReport.AddDataTable(dataGridView1);
        //attach all Datatables  you want
        EasyHtmlReport.AddDataTable(dataGridView1"width='100%' border=1'");

Todos

  • Write MORE Examples
  • Build For WPF

License

MIT

Free Software, Hell Yeah!

Release Notes

Initial Release.

Dependencies

This package has no dependencies.

Version History

Version Downloads Last updated
1.0.0 212 3/7/2019