(Showing Draft Content)

Get Started with ActiveReportsJS Report Viewer Vue Component

Create a Vue Application

The easiest and recommended way for creating a new Vue application is to use Vue CLI. Run the following command from the command prompt or terminal to create a Vue 2 application using the default preset. For details, see presets on the Vue CLI site.

vue create -p default arjs-vue-viewer-app

Install ActivereportsJS npm packages

We distribute the Vue Report Viewer Component via @grapecity/activereports-vue npm package that depends on the main @grapecity/activereports package that includes the core functionality. To install the most current version of these packages, run the following command from the application's root folder.

npm install @grapecity/activereports-vue

Or if you are using yarn:

yarn add @grapecity/activereports-vue

If you are using Vue 2.0 then install @vue/composition-api package:

npm install @vue/composition-api

Or if you are using yarn:

yarn add @vue/composition-api

Add ActiveReportsJS report to the application

ActiveReportsJS uses JSON format and rdlx-json extension for report template files. In the public 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"

Add Vue Report Viewer component to the application

Open the src\App.vue file and replace the default content with the following code. This single file component uses the Vue Report Viewer to display the report template that you added on the previous step. It also imports the default Report Viewer Component Styles and defines style for the viewer's hosting element.

  <div id="viewer-host">
    <JSViewer v-bind:report="{ Uri: 'report.rdlx-json' }"></JSViewer>

import { Viewer } from "@grapecity/activereports-vue";

export default {
  name: "App",
  components: {
    JSViewer: Viewer,

<style src="../node_modules/@grapecity/activereports/styles/ar-js-ui.css"></style>
<style src="../node_modules/@grapecity/activereports/styles/ar-js-viewer.css" ></style>

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

Run and test the application

Running the npm run serve or yarn serve commands could fail with the fatal error that the JavaScript heap is out of memory. In that case, open the package.json file and replace the serve script with the following one.

node --max_old_space_size=8192 ./node_modules/@vue/cli-service/bin/vue-cli-service.js serve

Then re-run the npm run serve or yarn serve command.

When the application starts, the ActiveReportsJS Viewer component will appear on the page. The viewer will display the report that shows "Hello, ActiveReportsJS Viewer" text. You can test the basic functionality by using buttons on the toolbar or exporting a report to one of the available formats.