(Showing Draft Content)

Using ActiveReportsJS Report Designer Component in pure JavaScript applications

Create Pure JavaScript Application

Such an application consists of the HTML page and JS scripts. Here is the example of code

<!DOCTYPE html>

<html lang="en">
    <meta charset="utf-8" />

    <title>ARJS Report designer</title>
    <meta name="description" content="ARJS Report designer" />
    <meta name="author" content="GrapeCity" />


Install ActivereportsJS

We distribute ActiveReportJS scripts and styles via both CDN and NPM. The easiest way to install the ActiveReportsJS report designer to a Pure JavaScript application is to add CDN-based references to the head tag.

<script src="https://cdn.grapecity.com/activereportsjs/2.latest/dist/ar-js-core.js"></script>
<script src="https://cdn.grapecity.com/activereportsjs/2.latest/dist/ar-js-designer.js"></script>

Add the Report Designer Host element

Add the div element that will host the report designer to the body tag.

<div id="designer-host"></div>

Add styles for the designer-host element to head tag

  #designer-host {
    width: 100%;
    height: 100vh;

Add ActiveReportsJS report to the application

ActiveReportsJS uses JSON format and rdlx-json extension for report template files. In the application's root folder, create the new file called report.rdlx-json and insert the following JSON content into that file.

  "Name": "Report",
  "Body": {
    "ReportItems": [
        "Type": "textbox",
        "Name": "TextBox1",
        "Value": "Hello, ActiveReportsJS Viewer",
        "Style": {
          "FontSize": "18pt"
        "Width": "8.5in",
        "Height": "0.5in"

Initialize Report Designer component

Add the following script in the body tag right after the designer-host element so that this script would run after the element is rendered.

  var designer = new GC.ActiveReports.ReportDesigner.Designer("#designer-host");
  designer.setReport({id: "report.rdlx", displayName: "my report"});

Run and test the application

Run the application by using opening the HTML page in the browser. The ActiveReportsJS Designer component will appear on the page and display the report design. Test the basic functionality by adding report items, setting their properties, creating the data source, et cetera. Visit the Developer Guide and the Online Demo for more information on how to use the Report Designer component.