Search results
PDF

Report Viewer SDK offline licensing overview

Starting with the version 2.4.X , Syncfusion introduced offline licensing system too for the Bold Reports. You have to include the license key fie ( .lic ) in your projects in order to use the Bold Reports assemblies. The below licensing error will be displayed if the license token is missing in your projects.

This application was built using a trial version of Bold Reports. Please include a valid license to permanently remove this license validation message. You can also obtain a free 30 day evaluation license to temporarily remove this message during the evaluation period.

How to generate and download Bold Reports offline license key

The License key file( .lic ) can be generated from the Downloads section of the Bold Reports site.

Bold Reports License key file( .lic ) are version specific. So, you should use the corresponding version License key file( .lic ) in the projects.

How to register the Bold Reports offline license key

The generated offline license key file( .lic ) is just a string that needs to be registered before any Bold Reports control is initiated. The following code is used to register the license.

string licenseKey = File.ReadAllText(licenseFilePath);
Bold.Licensing.BoldLicenseProvider.RegisterLicense(licenseKey, isOfflineValidation: true);

ASP. NET

Register the license key in Application_Start method of Global.asax.cs/Global.asax

void Application_Start(object sender, EventArgs e)
{
    //Register Bold licenseKey
    string licenseKey = File.ReadAllText(@"boldreports_licensekey.lic"); // Replace it with actual license key file path
    BoldLicenseProvider.RegisterLicense(licenseKey, isOfflineValidation: true);
    // Code that runs on application startup
    RouteConfig.RegisterRoutes(RouteTable.Routes);
    BundleConfig.RegisterBundles(BundleTable.Bundles);
}

ASP. NET MVC

Register the license key in Application_Start method of Global.asax.cs

void Application_Start(object sender, EventArgs e)
{
    //Register Bold licenseKey
    string licenseKey = File.ReadAllText(@"boldreports_licensekey.lic"); // Replace it with actual license key file path
    BoldLicenseProvider.RegisterLicense(licenseKey, isOfflineValidation: true);
    // Code that runs on application startup
    RouteConfig.RegisterRoutes(RouteTable.Routes);
    BundleConfig.RegisterBundles(BundleTable.Bundles);
}

To get start quickly, you can refer this video:

ASP. NET Core

Register the license key in Configure method of Startup.cs

public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory)
{
    //Register Bold licenseKey
    string licenseKey = File.ReadAllText(@"boldreports_licensekey.lic"); // Replace it with actual license key file path
    BoldLicenseProvider.RegisterLicense(licenseKey, isOfflineValidation: true);
}

To get start quickly, you can refer this video:

WPF

Register the license key in App constructor of App.xaml.cs in C#. If App constructor not available in App.xaml.cs , create the App() constructor in App.xaml.cs and register the license key inside the constructor.

public partial class App : Application
{
    public App()
    {
     //Register Bold licenseKey
     string licenseKey = File.ReadAllText(@"boldreports_licensekey.lic");  // Replace it with actual license key file path
     Bold.Licensing.BoldLicenseProvider.RegisterLicense(licenseKey, isOfflineValidation:true);
    }
}

To get start quickly, you can refer this video:

UWP

Register the license key in App.xaml.cs constructor before InitializeComponent() in C#. If App constructor not available in App.xaml.cs , create the App() constructor in App.xaml.cs , Add the boldreports_licensekey.lic file as embedded resource in the project and register the license key inside the constructor.

public App()
{
    var assembly= typeof(App).GetTypeInfo().Assembly;
    var fileStream=assembly.GetManifestResourceStream("OfflineExport.boldreports_licensekey.lic");

    if (fileStream!= null && fileStream.Length >0)
    {
        using(var reader= new StreamReader(fileStream))
        {
            //Register Bold licenseKey
             string licenseKey = reader.ReadLineAsync().Result;
             BoldLicenseProvider.RegisterLicenseProvider.RegisterLicense(licenseKey, isOfflineValidation: true);
        }
    }
    this.InitializeComponent();
    this.Suspending += OnSuspending;
}

To get start quickly, you can refer this video:

Blazor

For Server side application. Register the license key in Configure method of Startup.cs

public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
    //Register Bold licenseKey
    string licensekey = System.IO.File.ReadAllText(@"boldreports_licensekey.lic");// Replace it with actual license key file path
    Bold.Licensing.BoldLicenseProvider.RegisterLicense(licensekey, isOfflineValidation: true);
    if (env.IsDevelopment())
    {
        app.UseDeveloperExceptionPage();
    }
    else
    {
        app.UseExceptionHandler("/Error");
        // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
        app.UseHsts();
    }

    app.UseHttpsRedirection();
    app.UseStaticFiles();

    app.UseRouting();

    app.UseEndpoints(endpoints =>
    {
        endpoints.MapControllers();
        endpoints.MapBlazorHub();
        endpoints.MapFallbackToPage("/_Host");
    });
}

To get start quickly, you can refer this video: