Skip to footer content
MIGRATION GUIDES

How to Migrate from FastReport to IronPDF in C#

FastReport.NET is a powerful reporting solution built for the .NET ecosystem, featuring a visual report designer and band-based architecture for creating complex data-driven reports. However, FastReport presents significant challenges for modern PDF generation workflows: report designer dependency that limits code-first development, a steep learning curve around band-based concepts (DataBand, PageHeaderBand), limited CSS support using proprietary formatting, complex data binding with RegisterData() boilerplate, and fragmented NuGet packages requiring multiple installations. This comprehensive guide provides a step-by-step migration path from FastReport to IronPDF—a general-purpose PDF library that leverages HTML/CSS web technologies for flexible, programmatic document generation.

Why Migrate from FastReport to IronPDF?

FastReport.NET's specialization in reporting creates friction for development teams needing versatile PDF generation. Understanding these architectural differences is essential for planning your migration.

The FastReport Challenges

  1. Report Designer Dependency: Creating complex layouts requires the visual designer or deep knowledge of .frx file structure—not suitable for code-first development approaches.

  2. Steep Learning Curve: FastReport's band-based architecture (DataBand, PageHeaderBand, PageFooterBand) requires understanding report-specific concepts that don't transfer to other technologies.

  3. Limited CSS Support: Web-standard styling isn't natively supported; styling is done through FastReport's proprietary format rather than familiar CSS.

  4. Complex Data Binding: RegisterData() and DataSource connections add boilerplate for simple PDF generation scenarios.

  5. Fragmented Packages: Multiple NuGet packages needed for full functionality (FastReport.OpenSource, FastReport.OpenSource.Export.PdfSimple, etc.).

  6. Licensing Complexity: Open source version has limited features; commercial version required for PDF encryption, digital signing, and font embedding.

Architecture Comparison

AspectFastReportIronPDF
Design ApproachVisual designer + .frx filesHTML/CSS (web technologies)
Learning CurveSteep (band-based concepts)Gentle (HTML/CSS knowledge)
Data BindingRegisterData(), DataBandString interpolation, Razor, templating
CSS SupportLimitedFull CSS3 with Flexbox/Grid
Package ModelMultiple packagesSingle package (all features)
Rendering EngineCustomLatest Chromium
PDF ManipulationExport-focusedFull (merge, split, security, forms)
Modern .NET.NET Standard 2.0.NET 6/7/8/9+ native

Key Migration Benefits

  1. Web Technologies: Use familiar HTML/CSS instead of proprietary band-based layouts
  2. Code-First Development: Generate PDFs programmatically without visual designer dependency
  3. Single Package: One NuGet package includes all PDF features
  4. Modern Rendering: Latest Chromium engine for pixel-perfect CSS3 output
  5. Full PDF Manipulation: Merge, split, security, forms—not just export

Pre-Migration Preparation

Prerequisites

Ensure your environment meets these requirements:

  • .NET Framework 4.6.2+ or .NET Core 3.1 / .NET 5-9
  • Visual Studio 2019+ or VS Code with C# extension
  • NuGet Package Manager access
  • IronPDF license key (free trial available at ironpdf.com)

Audit FastReport Usage

Run these commands in your solution directory to identify all FastReport references:

# Find all FastReport references
grep -r "FastReport\|\.frx\|PDFExport\|PDFSimpleExport\|DataBand\|RegisterData" --include="*.cs" --include="*.csproj" .

# Check NuGet packages
dotnet list package | grep FastReport
# Find all FastReport references
grep -r "FastReport\|\.frx\|PDFExport\|PDFSimpleExport\|DataBand\|RegisterData" --include="*.cs" --include="*.csproj" .

# Check NuGet packages
dotnet list package | grep FastReport
SHELL

Document Your Report Templates

Before migration, catalog all .frx files and their purposes:

  • Report name and purpose
  • Data sources used
  • Headers/footers configuration
  • Page numbering requirements
  • Special formatting or styling

Understanding the Paradigm Shift

The most significant change when migrating from FastReport to IronPDF is the fundamental design approach. FastReport uses band-based visual design with .frx template files and proprietary concepts like DataBand, PageHeaderBand, and RegisterData(). IronPDF uses HTML/CSS—web technologies that most developers already know.

This means converting FastReport band configurations to HTML templates, replacing RegisterData() with direct data binding via string interpolation or Razor templates, and transforming PageHeaderBand/PageFooterBand to HTML-based headers and footers.

Step-by-Step Migration Process

Step 1: Update NuGet Packages

Remove all FastReport packages and install IronPDF:

# Remove all FastReport packages
dotnet remove package FastReport.OpenSource
dotnet remove package FastReport.OpenSource.Export.PdfSimple
dotnet remove package FastReport.OpenSource.Web
dotnet remove package FastReport.OpenSource.Data.MsSql

# Install IronPDF (includes all features)
dotnet add package IronPdf
# Remove all FastReport packages
dotnet remove package FastReport.OpenSource
dotnet remove package FastReport.OpenSource.Export.PdfSimple
dotnet remove package FastReport.OpenSource.Web
dotnet remove package FastReport.OpenSource.Data.MsSql

# Install IronPDF (includes all features)
dotnet add package IronPdf
SHELL

Step 2: Update Namespace References

Replace FastReport namespaces with IronPDF:

// Remove these
using FastReport;
using FastReport.Export.PdfSimple;
using System.IO;

// Add this
using IronPdf;
// Remove these
using FastReport;
using FastReport.Export.PdfSimple;
using System.IO;

// Add this
using IronPdf;
$vbLabelText   $csharpLabel

Step 3: Configure License

// Add at application startup (Program.cs or Startup.cs)
IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY";
// Add at application startup (Program.cs or Startup.cs)
IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY";
$vbLabelText   $csharpLabel

Complete API Migration Reference

Core Class Mapping

FastReport ClassIronPDF EquivalentNotes
ReportChromePdfRendererMain rendering class
PDFExportChromePdfRenderer + SecuritySettingsRendering + security
PDFSimpleExportChromePdfRendererSimplified export
ReportPageHTML <body> or <div>Page content
TextObjectHTML <p>, <span>, <div>Text elements
HTMLObjectDirect HTML renderingHTML content
PageHeaderBandHtmlHeaderFooterPage headers
PageFooterBandHtmlHeaderFooterPage footers

Method Mapping

FastReport MethodIronPDF EquivalentNotes
report.Load("template.frx")HTML template file or stringUse HTML/CSS for layout
report.RegisterData(data, "name")String interpolation or RazorDirect data binding
report.Prepare()N/ANot needed (direct rendering)
report.Export(export, stream)pdf.SaveAs(path)Simplified export

Page Number Placeholder Conversion

FastReport and IronPDF use different placeholder syntax for page numbers:

FastReportIronPDF
[Page]{page}
[TotalPages]{total-pages}

Code Migration Examples

HTML to PDF Conversion

This example demonstrates the fundamental difference between FastReport's HTMLObject approach and IronPDF's direct rendering.

FastReport Implementation:

// NuGet: Install-Package FastReport.OpenSource
using FastReport;
using FastReport.Export.PdfSimple;
using System.IO;

class Program
{
    static void Main()
    {
        using (Report report = new Report())
        {
            // Create HTML object
            FastReport.HTMLObject htmlObject = new FastReport.HTMLObject();
            htmlObject.Width = 500;
            htmlObject.Height = 300;
            htmlObject.Text = "<html><body><h1>Hello World</h1><p>This is a test PDF</p></body></html>";

            // Prepare report
            report.Prepare();

            // Export to PDF
            PDFSimpleExport pdfExport = new PDFSimpleExport();
            using (FileStream fs = new FileStream("output.pdf", FileMode.Create))
            {
                report.Export(pdfExport, fs);
            }
        }
    }
}
// NuGet: Install-Package FastReport.OpenSource
using FastReport;
using FastReport.Export.PdfSimple;
using System.IO;

class Program
{
    static void Main()
    {
        using (Report report = new Report())
        {
            // Create HTML object
            FastReport.HTMLObject htmlObject = new FastReport.HTMLObject();
            htmlObject.Width = 500;
            htmlObject.Height = 300;
            htmlObject.Text = "<html><body><h1>Hello World</h1><p>This is a test PDF</p></body></html>";

            // Prepare report
            report.Prepare();

            // Export to PDF
            PDFSimpleExport pdfExport = new PDFSimpleExport();
            using (FileStream fs = new FileStream("output.pdf", FileMode.Create))
            {
                report.Export(pdfExport, fs);
            }
        }
    }
}
$vbLabelText   $csharpLabel

IronPDF Implementation:

// NuGet: Install-Package IronPdf
using IronPdf;

class Program
{
    static void Main()
    {
        var renderer = new ChromePdfRenderer();
        var pdf = renderer.RenderHtmlAsPdf("<html><body><h1>Hello World</h1><p>This is a test PDF</p></body></html>");
        pdf.SaveAs("output.pdf");
    }
}
// NuGet: Install-Package IronPdf
using IronPdf;

class Program
{
    static void Main()
    {
        var renderer = new ChromePdfRenderer();
        var pdf = renderer.RenderHtmlAsPdf("<html><body><h1>Hello World</h1><p>This is a test PDF</p></body></html>");
        pdf.SaveAs("output.pdf");
    }
}
$vbLabelText   $csharpLabel

FastReport requires creating a Report object, an HTMLObject with fixed dimensions, preparing the report, and exporting via stream—seven lines of code with using statements. IronPDF accomplishes the same result in three lines with direct HTML rendering. For more options, see the HTML to PDF documentation.

URL to PDF Conversion

This example highlights how FastReport requires manual HTML download while IronPDF handles URL rendering natively.

FastReport Implementation:

// NuGet: Install-Package FastReport.OpenSource
using FastReport;
using FastReport.Export.PdfSimple;
using System.IO;
using System.Net;

class Program
{
    static void Main()
    {
        // Download HTML content from URL
        string htmlContent;
        using (WebClient client = new WebClient())
        {
            htmlContent = client.DownloadString("https://example.com");
        }

        using (Report report = new Report())
        {
            FastReport.HTMLObject htmlObject = new FastReport.HTMLObject();
            htmlObject.Width = 800;
            htmlObject.Height = 600;
            htmlObject.Text = htmlContent;

            report.Prepare();

            PDFSimpleExport pdfExport = new PDFSimpleExport();
            using (FileStream fs = new FileStream("webpage.pdf", FileMode.Create))
            {
                report.Export(pdfExport, fs);
            }
        }
    }
}
// NuGet: Install-Package FastReport.OpenSource
using FastReport;
using FastReport.Export.PdfSimple;
using System.IO;
using System.Net;

class Program
{
    static void Main()
    {
        // Download HTML content from URL
        string htmlContent;
        using (WebClient client = new WebClient())
        {
            htmlContent = client.DownloadString("https://example.com");
        }

        using (Report report = new Report())
        {
            FastReport.HTMLObject htmlObject = new FastReport.HTMLObject();
            htmlObject.Width = 800;
            htmlObject.Height = 600;
            htmlObject.Text = htmlContent;

            report.Prepare();

            PDFSimpleExport pdfExport = new PDFSimpleExport();
            using (FileStream fs = new FileStream("webpage.pdf", FileMode.Create))
            {
                report.Export(pdfExport, fs);
            }
        }
    }
}
$vbLabelText   $csharpLabel

IronPDF Implementation:

// NuGet: Install-Package IronPdf
using IronPdf;

class Program
{
    static void Main()
    {
        var renderer = new ChromePdfRenderer();
        var pdf = renderer.RenderUrlAsPdf("https://example.com");
        pdf.SaveAs("webpage.pdf");
    }
}
// NuGet: Install-Package IronPdf
using IronPdf;

class Program
{
    static void Main()
    {
        var renderer = new ChromePdfRenderer();
        var pdf = renderer.RenderUrlAsPdf("https://example.com");
        pdf.SaveAs("webpage.pdf");
    }
}
$vbLabelText   $csharpLabel

FastReport requires manually downloading HTML content with WebClient, then embedding it in an HTMLObject with fixed dimensions—a workaround that doesn't properly handle JavaScript execution or relative resource URLs. IronPDF's RenderUrlAsPdf directly renders the live webpage with full JavaScript execution using the Chromium engine. For more options, see the URL to PDF documentation.

Headers and Footers with Page Numbers

This example demonstrates the complexity difference between FastReport's band-based system and IronPDF's HTML-based approach.

FastReport Implementation:

// NuGet: Install-Package FastReport.OpenSource
using FastReport;
using FastReport.Export.PdfSimple;
using System.IO;

class Program
{
    static void Main()
    {
        using (Report report = new Report())
        {
            report.Load("template.frx");

            // Set report page properties
            FastReport.ReportPage page = report.Pages[0] as FastReport.ReportPage;

            // Add page header
            FastReport.PageHeaderBand header = new FastReport.PageHeaderBand();
            header.Height = 50;
            FastReport.TextObject headerText = new FastReport.TextObject();
            headerText.Text = "Document Header";
            header.Objects.Add(headerText);
            page.Bands.Add(header);

            // Add page footer
            FastReport.PageFooterBand footer = new FastReport.PageFooterBand();
            footer.Height = 50;
            FastReport.TextObject footerText = new FastReport.TextObject();
            footerText.Text = "Page [Page]";
            footer.Objects.Add(footerText);
            page.Bands.Add(footer);

            report.Prepare();

            PDFSimpleExport pdfExport = new PDFSimpleExport();
            using (FileStream fs = new FileStream("report.pdf", FileMode.Create))
            {
                report.Export(pdfExport, fs);
            }
        }
    }
}
// NuGet: Install-Package FastReport.OpenSource
using FastReport;
using FastReport.Export.PdfSimple;
using System.IO;

class Program
{
    static void Main()
    {
        using (Report report = new Report())
        {
            report.Load("template.frx");

            // Set report page properties
            FastReport.ReportPage page = report.Pages[0] as FastReport.ReportPage;

            // Add page header
            FastReport.PageHeaderBand header = new FastReport.PageHeaderBand();
            header.Height = 50;
            FastReport.TextObject headerText = new FastReport.TextObject();
            headerText.Text = "Document Header";
            header.Objects.Add(headerText);
            page.Bands.Add(header);

            // Add page footer
            FastReport.PageFooterBand footer = new FastReport.PageFooterBand();
            footer.Height = 50;
            FastReport.TextObject footerText = new FastReport.TextObject();
            footerText.Text = "Page [Page]";
            footer.Objects.Add(footerText);
            page.Bands.Add(footer);

            report.Prepare();

            PDFSimpleExport pdfExport = new PDFSimpleExport();
            using (FileStream fs = new FileStream("report.pdf", FileMode.Create))
            {
                report.Export(pdfExport, fs);
            }
        }
    }
}
$vbLabelText   $csharpLabel

IronPDF Implementation:

// NuGet: Install-Package IronPdf
using IronPdf;

class Program
{
    static void Main()
    {
        var renderer = new ChromePdfRenderer();

        // Configure header and footer
        renderer.RenderingOptions.HtmlHeader = new HtmlHeaderFooter()
        {
            HtmlFragment = "<div style='text-align:center'>Document Header</div>"
        };

        renderer.RenderingOptions.HtmlFooter = new HtmlHeaderFooter()
        {
            HtmlFragment = "<div style='text-align:center'>Page {page} of {total-pages}</div>"
        };

        var pdf = renderer.RenderHtmlAsPdf("<html><body><h1>Report Content</h1><p>This is the main content.</p></body></html>");
        pdf.SaveAs("report.pdf");
    }
}
// NuGet: Install-Package IronPdf
using IronPdf;

class Program
{
    static void Main()
    {
        var renderer = new ChromePdfRenderer();

        // Configure header and footer
        renderer.RenderingOptions.HtmlHeader = new HtmlHeaderFooter()
        {
            HtmlFragment = "<div style='text-align:center'>Document Header</div>"
        };

        renderer.RenderingOptions.HtmlFooter = new HtmlHeaderFooter()
        {
            HtmlFragment = "<div style='text-align:center'>Page {page} of {total-pages}</div>"
        };

        var pdf = renderer.RenderHtmlAsPdf("<html><body><h1>Report Content</h1><p>This is the main content.</p></body></html>");
        pdf.SaveAs("report.pdf");
    }
}
$vbLabelText   $csharpLabel

FastReport requires loading a template file, casting page objects, creating band objects, setting heights, creating text objects, adding to band collections, and adding bands to pages. IronPDF uses HtmlHeaderFooter with simple HTML fragments—you can style headers and footers with full CSS. Note the page number syntax change: [Page] becomes {page}, and [TotalPages] becomes {total-pages}. For more options, see the headers and footers documentation.

Critical Migration Notes

No .frx Template Files

FastReport templates (.frx) won't work with IronPDF. Convert your layouts to HTML/CSS templates:

// FastReport - loads .frx template
report.Load("report.frx");

// IronPDF - use HTML template
var html = File.ReadAllText("template.html");
var pdf = renderer.RenderHtmlAsPdf(html);
// FastReport - loads .frx template
report.Load("report.frx");

// IronPDF - use HTML template
var html = File.ReadAllText("template.html");
var pdf = renderer.RenderHtmlAsPdf(html);
$vbLabelText   $csharpLabel

Data Binding Conversion

Replace RegisterData() with direct HTML generation:

// FastReport
report.RegisterData(dataSet, "Data");
report.GetDataSource("Data").Enabled = true;

// IronPDF - use string interpolation or StringBuilder
var html = new StringBuilder();
foreach (var item in data)
{
    html.Append($"<tr><td>{item.Name}</td><td>{item.Value}</td></tr>");
}
var pdf = renderer.RenderHtmlAsPdf(html.ToString());
// FastReport
report.RegisterData(dataSet, "Data");
report.GetDataSource("Data").Enabled = true;

// IronPDF - use string interpolation or StringBuilder
var html = new StringBuilder();
foreach (var item in data)
{
    html.Append($"<tr><td>{item.Name}</td><td>{item.Value}</td></tr>");
}
var pdf = renderer.RenderHtmlAsPdf(html.ToString());
$vbLabelText   $csharpLabel

Security Settings

// IronPDF security
var pdf = renderer.RenderHtmlAsPdf(html);
pdf.SecuritySettings.UserPassword = "password";
pdf.SecuritySettings.OwnerPassword = "ownerPassword";
pdf.SecuritySettings.AllowUserPrinting = PdfPrintSecurity.FullPrintRights;
// IronPDF security
var pdf = renderer.RenderHtmlAsPdf(html);
pdf.SecuritySettings.UserPassword = "password";
pdf.SecuritySettings.OwnerPassword = "ownerPassword";
pdf.SecuritySettings.AllowUserPrinting = PdfPrintSecurity.FullPrintRights;
$vbLabelText   $csharpLabel

For comprehensive security options, see the encryption documentation.

Post-Migration Checklist

After completing the code migration, verify the following:

  • Visual comparison of generated PDFs
  • Verify headers/footers and page numbers
  • Test with production data volumes
  • Validate security/encryption features
  • Performance benchmarking
  • Remove unused .frx template files
  • Delete FastReport-related code
  • Update documentation

Future-Proofing Your PDF Infrastructure

With .NET 10 on the horizon and C# 14 introducing new language features, choosing a PDF library that embraces modern web technologies ensures long-term maintainability. IronPDF's HTML/CSS approach means your templates leverage the same skills used across web development—no proprietary band-based concepts that don't transfer to other technologies. As projects extend into 2025 and 2026, the ability to use standard HTML templates with CSS3 features like Flexbox and Grid provides design flexibility that FastReport's proprietary formatting cannot match.

Additional Resources


Migrating from FastReport to IronPDF eliminates the visual designer dependency, band-based learning curve, and fragmented package model. The transition to HTML/CSS-based PDF generation leverages familiar web technologies while providing full PDF manipulation capabilities—merge, split, security, and forms—in a single package.

Curtis Chau
Technical Writer

Curtis Chau holds a Bachelor’s degree in Computer Science (Carleton University) and specializes in front-end development with expertise in Node.js, TypeScript, JavaScript, and React. Passionate about crafting intuitive and aesthetically pleasing user interfaces, Curtis enjoys working with modern frameworks and creating well-structured, visually appealing manuals.

...

Read More