Using ActiveReportsJS Report Designer Component in Angular applications

Create Angular Application

The easiest and recommended way for creating a new Angular application is to use Angular CLI. Run the following command from the command prompt or terminal to create an Angular application with default options. For details, see options on the Angular site.

ng new arjs-angular-designer-app --defaults

Install ActivereportsJS npm packages

We distribute the Angular Report Designer Component via @grapecity/activereports-angular npm package. The main @grapecity/activereports package provides the core functionality. To install the latest version of these packages, run the following command from the application's root folder.

npm install @grapecity/activereports-angular @grapecity/activereports

Or if you are using yarn:

yarn add @grapecity/activereports-angular @grapecity/activereports

Import ActiveReportsJS styles

Open the src\styles.css file and add the following code. It imports the default Report Designer Component Styles

@import "@grapecity/activereports/styles/ar-js-ui.css";
@import "@grapecity/activereports/styles/ar-js-designer.css";

Register ActivereportsJS Angular module

Open the src\app\app.module.ts file and replace its content with the following code. It registers the ActiveReportsModule module in addition to the standard modules.

import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { ActiveReportsModule } from '@grapecity/activereports-angular';

import { AppComponent } from './app.component';

  declarations: [AppComponent],
  imports: [BrowserModule, ActiveReportsModule],
  providers: [],
  bootstrap: [AppComponent],
export class AppModule {}

Add ActiveReportsJS report to the application

ActiveReportsJS uses JSON format and rdlx-json extension for report template files. In the src\assets 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 Designer",
        "Style": {
          "FontSize": "18pt"
        "Width": "8.5in",
        "Height": "0.5in"

Add ActivereportsJS Angular Report Designer to the application

Open src\app\app.component.ts and replace its content with the following code. The template of the component uses the Angular Report Designer Component. The designer component's input report property points to the report.rdlx-json that you created on the previous step.

import { Component } from '@angular/core';

  selector: 'app-root',
    '<div id="designer-host"><gc-activereports-designer [report]="report"> </gc-activereports-designer></div>',
  styleUrls: ['./app.component.css'],
export class AppComponent {
  report = { id: 'assets/report.rdlx-json', displayName: 'my report' };

Add styles for the designer host element to src\app\app.component.css

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

Run and test the application

Run the application using npm start or yarn start or ng serve commands. The ActiveReportsJS Designer component will appear on the start page of the application 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.