How to License ActiveReportsJS
Evaluation Version
Suppose you use the evaluation version of ActiveReportsJS and run a front-end application that uses ActiveReportsJS on localhost. In that case, a watermark with the evaluation message appears on a report preview and in the exported files.
If you would like to deploy an application into a test server, you can contact us.sales@grapecity.com and request the evaluation distribution key. Once you receive the key, follow the guidelines in the Reactjs, Angular, and Vue applications section.
The standalone designer application is available for 30 days. However, you can extend the evaluation period by sending the request to us.sales@grapecity.com.
Once you have purchased the license and received the Order Confirmation email, you can use the following methods to license the standalone designer application and your front-end application.
Watch the video:
Licensing the Standalone Designer Application
- Find the Designer License Key in the Order Confirmation email and copy it
- Run the Standalone Designer Application
- Click the evaluation banner on the top right corner of the UI
- Paste the designer license key in the pop-up dialog
- Click OK
You can use the same Designer License Key for multiple installations of ActiveReportsJS on different machines.
Licensing a Front-End Application
When you deploy your application in the developing, staging, or production server, you generate the distribution key and integrate it into the application's code.
The distribution key is a sequence of characters that determines one or more hostnames on which your application is available for end-users.
To generate the distribution key:
- Login to your GrapeCity Account
- Navigate to the "My Licenses" page and click the "Distribution Licenses" link
- Find the ActiveReportsJS license item, for example, ActiveReportsJS v3 Three (3) Hostname Deployment License - ANNUAL
- Click the "Create Distribution Keys" link.
- On the "Create a Distribution Key" page, make sure that you read the "Important" notes.
- Click the "Add A Hostname" button.
- For each hostname where your application is available for end-users, enter the name in the input box, and click the "add hostname" button.
- Click the "Generate Distribution Key" button.
- The distribution key will appear at the bottom. Copy the key and save it somewhere for future reference
Now you should insert the generated key in your application's source code. ActiveReportsJS runs on the client-side, so the code that injects the license should run on the client-side. Here are a few recipes for the most popular front-end frameworks.
Reactjs, Angular, and Vue Applications
Add the following code to the entry point of your application. By default, the entry point is:
- src/index.jsx(tsx) for a Reactjs application
- src/main.ts for an Angular application
- src/main.js(ts) for a Vue application
import { Core } from "@grapecity/activereports";
Core.setLicenseKey("DISTRIBUTION KEY GOES HERE");
Pure JavaScript applicationAdd the reference to the ar-js-core.js script to the HTML page
<script type="text/javascript" src="https://cdn.grapecity.com/activereportsjs/3.latest/dist/ar-js-core.js"></script>
Add the following code so that it runs after the ar-js-core.js script is loaded
GC.ActiveReports.Core.setLicenseKey("DISTRIBUTION KEY GOES HERE");