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:
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.
ActiveReports Editions lists the features included with each license.
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:
|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:
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.
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.
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.
Copy the ActiveReports strings from the file into the licenses.licx file in the calling application
If there is no license file, from the Project menu, select Add New Item
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
From the Build menu, select Rebuild Project to embed the licensing
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:
If your application uses the PDF export, you also need this one:
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:
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:
|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|
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.
This process has only two steps:
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.