Skip to main content Skip to footer

Three-Step Fix for Licensing Issues in .NET Reporting

To use ActiveReports, you need to activate a license key on your machine. Here's how to make sure your device is licensed.

Go to the Start page and, under GrapeCity, run the License Manager.

You can also open it from File Explorer on a path like this:

C:\ProgramData\GrapeCity\gclm  

Three-Step Fix for Common Licensing Errors in ActiveReports.NET Reporting

If you have a license activated on your machine, click on "details." This action displays your serial key and which edition of ActiveReports it enables.

Three-Step Fix for Common Licensing Errors in ActiveReports.NET Reporting

ActiveReports Editions lists the features included with each license.

Common Licensing Errors and Causes

When you run your application on your machine, it automatically finds the machine's license. But when you distribute your application, you have to build that license information into the calling application. Otherwise, you receive an evaluation or error message.

Here are some common errors and their causes:


Error
Cause
Application cannot run because it was built with no license Licensing is not present in the application or the calling application
See below for information on how to license the calling application
License for (control name) could not be found Extra lines for components that you do not use are in the licenses.licx file Delete unnecessary information and rebuild the project
Licensing has not been correctly applied to the application Check the three key points below
Exception (LicenseException) Check the three key points below
'No License' message on running .NET Core applications in Visual Studio 2017 Visual Studio 2017 does not support core license compilation

When you have a license error, here are the three things to check:

1. Is the License File Added to the Appropriate Project?

The licenses.licx (license) file contains license information for ActiveReports. It is automatically generated in the project where ActiveReports is used. If your application is composed of multiple projects, and another project calls the reports defined in your class library, you need to register it in the calling project rather than just in your report project.

Three-Step Fix for Common Licensing Errors in ActiveReports.NET Reporting

When you add an ActiveReports web service to a Page report, RDL report, or XML-based section report project, the licenses.licx file is not created automatically, and the license strings are not added. In these cases, you must manually add licensing to your application if you want to create a control at run time or use the HTTP handlers.

How to Manually Add Licensing to The Calling Application

Note: In a C# Windows Forms project, the license file is in the Properties folder. In a Visual Basic project, it is in the My Project folder.

  1. In your application that contains ActiveReports components, check that the proper licensing strings are in the licenses.licx file (See the table of license strings below)
  2. Copy the ActiveReports strings from the file into the licenses.licx file in the calling application

  3. If there is no license file, from the Project menu, select Add New Item

  4. From the listed templates, select a text file and change the name to "licenses.licx."
  5. In the Solution Explorer, double-click the newly created licenses.licx file to open it, and paste the licensing strings for all components you use

  6. From the Build menu, select Rebuild Project to embed the licensing

2. The Contents of the License File

Depending on which ActiveReports features you use in your application, the license file may need to contain multiple license strings. For example, you may only need these two lines for your application:

  • GrapeCity.ActiveReports.PageReport, GrapeCity.ActiveReports
  • GrapeCity.ActiveReports.Web.WebViewer, GrapeCity.ActiveReports.Web

If your application uses the PDF export, you also need this one:

  • GrapeCity.ActiveReports.Export.Pdf.Section.PdfExport
  • GrapeCity.ActiveReports.Export.Pdf

If you are using an older version of ActiveReports (v12 or lower), you will need to include the version at the end of the license string:

  • GrapeCity.ActiveReports.PageReport
  • GrapeCity.ActiveReports.v12
  • GrapeCity.ActiveReports.Web.WebViewer
  • GrapeCity.ActiveReports.Web.v12

Caution: If you add assemblies to the licx file that you do not use in your project, it causes a "License for (control name) could not be found" error. When you migrate a project to version 14 that was created in an old version, you can have errors if some of these license strings are missing or in the wrong format (or mention the wrong version).

Here are all the license strings that you might need:


Component
License String
Section report engine GrapeCity.ActiveReports.SectionReport, GrapeCity.ActiveReports
Page and RDL report engine GrapeCity.ActiveReports.PageReport, GrapeCity.ActiveReports
WinForms viewer control GrapeCity.ActiveReports.Viewer.Win.Viewer, GrapeCity.ActiveReports.Viewer.Win
WPF viewer control GrapeCity.ActiveReports.Viewer.Wpf.Viewer, GrapeCity.ActiveReports.Viewer.Wpf
PRO (some features) PDF export GrapeCity.ActiveReports.Export.Pdf.Section.PdfExport, GrapeCity.ActiveReports.Export.Pdf
PRO ONLY: WebViewer, JSViewer, HTTP handlers, Web service GrapeCity.ActiveReports.Web.WebViewer, GrapeCity.ActiveReports.Web
PRO ONLY: End-user designer GrapeCity.ActiveReports.Design.Designer, GrapeCity.ActiveReports.Design.Win

Three-Step Fix for Common Licensing Errors in ActiveReports.NET Reporting

The image above contains a license file that shows what it looks like if you use every ActiveReports component in your solution. When you create the Licenses.licx file automatically, the strings are longer, and include additional values, like this:

GrapeCity.ActiveReports.Viewer.Win.Viewer, GrapeCity.ActiveReports.Viewer.Win, Version = 14.X.XXXX.X, Culture = neutral, PublicKeyToken = cc4967777c49a3ff  

These longer strings can cause issues when you update your ActiveReports build, as it looks for that specific version of the file.

Safely remove these specific version values, and set the SpecificVersion property of the ActiveReports references to False.

Three-Step Fix for Common Licensing Errors in ActiveReports.NET Reporting

3. Ensure the Build Action Property is Configured Correctly for the License File

Three-Step Fix for Common Licensing Errors in ActiveReports.NET Reporting
This process has only two steps:

  1. In the Solution Explorer, select licenses. licx (you may need to click the "Show all files" button to see it)
  2. In the Properties window, ensure that the Build Action property is set to Embedded Resource

There you have it. In almost every case, you can resolve your licensing issues by checking these three points.

For more information, see License Your ActiveReports.

Tyler Barlock and Evan Warren

comments powered by Disqus