/ReportBuilderConverter-.NET_Core

.NET Core Converter for "Microsoft SQL Server Report Builder"

Primary LanguageC#

.NET Core Converter for "Microsoft SQL Server Report Builder"

Get Started (with Source)

Open "Visual Studio" and do respectively "File - Open - Project/Solution"

Choose "ReportBuilder.csproj"

Right click on your own Project, "Add - Project References"

Check "ReportBuilder" and submit "OK"


Usage

Usage

// Create instance of ReportConverter
IReportConverter reportConverter = new ReportConverter();


/*
 * PDF
 * Create bytes of PDF.
 */
byte[] PDF = reportConverter.toByte(
    reportFilePath: @"D:\test.rdl",
    fileExtension: ReportExtension.PDF,
    paramValues: new Dictionary<string, string> { { "id", "4" } }
    );
// Create file from bytes.
File.WriteAllBytes("D:\\test\\test.pdf", PDF);

/*
 * Excel
 * Create bytes of Excel.
 */
byte[] Excel = reportConverter.toByte(
    reportFilePath: @"D:\test.rdl",
    fileExtension: ReportExtension.Excel,
    paramValues: new Dictionary<string, string> { { "id", "4" } }
    );
// Create file from bytes.
File.WriteAllBytes("D:\\test\\test.xls", Excel);

/*
 * Word
 * Create bytes of Word.
 */
byte[] Word = reportConverter.toByte(
      reportFilePath: @"D:\test.rdl",
      fileExtension: ReportExtension.Word,
      paramValues: new Dictionary<string, string> { { "id", "4" } }
      );
// Create file from bytes.
File.WriteAllBytes("D:\\test\\test.doc", Word);

/*
 * Image
 * Create bytes of Image.
 */
byte[] Image = reportConverter.toByte(
      reportFilePath: @"D:\test.rdl",
      fileExtension: ReportExtension.Image,
      paramValues: new Dictionary<string, string> { { "id", "4" } }
      );
// Create file from bytes.
File.WriteAllBytes("D:\\test\\test.jpg", Image);