[{"id":"425f2be4-b65d-4cdf-b543-fb4397f51672","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"a1041c29-1f9f-497e-b577-3e673e487c51","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"c1e3b2a0-7159-4980-a5e1-4fbb04c7fcc1","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"128acbbc-5c49-416b-9c1f-91f679362b23","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"3bc7a653-1dd3-4a33-b35c-41b0ddc2f446","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"cecedb46-bf12-401c-a04c-5282e11b8274","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"2f1768df-3e8b-41c2-826e-93f1a82273d1","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"d9528848-3bae-42c1-8f6d-410a78341cef","tags":[{"product":null,"links":null,"id":"4d7b6a40-ab32-4c71-a381-58f3ffd2653e","name":"new","color":"#ed7422","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"2683b3de-5c23-429d-9a88-4917616d20ad","tags":[{"product":null,"links":null,"id":"4d7b6a40-ab32-4c71-a381-58f3ffd2653e","name":"new","color":"#ed7422","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"b96827a0-6bd4-4184-86a4-6fe503d0e4b4","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"96d2140c-5bb6-49b6-a4c7-4af4b7de2e52","tags":[{"product":null,"links":null,"id":"4d7b6a40-ab32-4c71-a381-58f3ffd2653e","name":"new","color":"#ed7422","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"11f27d32-9547-4a8c-9e88-5dd2bffffeda","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"d186bc7e-cbae-4d23-9cd9-a54880be8e4d","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"26754bf1-707e-4815-b6d3-dcdc87a59188","tags":[{"product":null,"links":null,"id":"4d7b6a40-ab32-4c71-a381-58f3ffd2653e","name":"new","color":"#ed7422","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"e4c0a89e-cceb-4863-a30a-dff94f1d8d08","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"c4f826a6-5d16-4399-8f1a-7b8449594941","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"ff2b9815-2596-47f7-8793-3585c9ee24a2","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"46851ce2-51a2-4af4-969d-9fe989997135","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"e3e87330-5250-4923-9cdf-e7e8afd353ab","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"a04db983-f77b-4ec6-857c-1c01afaed85a","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"434eed34-9059-46e4-88f9-15e47d09622c","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"30988f2a-ebd5-4a8c-b20e-54a11a528d30","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"a59719c8-0df2-44e1-b89c-9d8fa0312857","tags":[{"product":null,"links":null,"id":"4d7b6a40-ab32-4c71-a381-58f3ffd2653e","name":"new","color":"#ed7422","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"4be1ecee-287b-43a2-ba99-cfa89de88187","tags":[{"product":null,"links":null,"id":"4d7b6a40-ab32-4c71-a381-58f3ffd2653e","name":"new","color":"#ed7422","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"ea04cced-7866-48e5-a5fe-1e9f11004d59","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"ab17d080-0112-4ba4-8dae-ef367bec7b78","tags":[{"product":null,"links":null,"id":"4d7b6a40-ab32-4c71-a381-58f3ffd2653e","name":"new","color":"#ed7422","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]}]
        
(Showing Draft Content)

Customization

ActiveReportsJS Report Designer component includes various UI elements available to users by default. To customize the user interface, such as hiding certain elements or prohibiting specific actions like modifying data binding configurations, you can utilize the Customization API. This page describes how to apply these customizations.

DesignerConfig object

The report designer UI is configured in the API with the DesignerConfig object that has the following shape:

var designerConfig = {
  // General Settings
  language?: string, 
  units?: "in" | "cm",  
  customInitTemplates?: CustomInitTemplates,
  disableOpenSaveHotkeys?: boolean,
  lockLayout?: boolean,
  storeUserPreferences?: boolean,
  disableSystemClipboard?: boolean,

  editor?: editorSettings,
  appBar?: appBarSettings,
  toolBar?: toolBarSettings,
  menu?: menuSettings,
  data?: dataTabSettings,
  propertyGrid?: propertyGridSettings,
  statusBar?: statusBarSettings,
};

The General settings, editorSettings, appBarSettings, toolBarSettings, menuSettings, dataTabSettings, propertyGridSettings, and statusBarSettings objects described in the following sections.

General settings

The DesignerConfig object includes several properties that influence the overall behavior of the Report Designer:

  • language: Sets the UI language, you can find more details on the Localization page.

  • units : Sets the default measurement units for the report items.

  • customInitTemplates: Overrides the default properties for newly added report items

  • disableOpenSaveHotkeys: When set to true, this setting disables handling of keyboard shortcuts by the designer component.

  • lockLayout: When enabled (true), this setting prevents users from adding new items or removing existing items from the report layout. Users are only allowed to modify the properties of the items already present in the report.

  • storeUserPreferences: If enabled (true), the designer saves its configuration settings, such as Grid Size, to the browser storage. These settings are then automatically restored, unless they are explicitly defined in a subsequent session.

  • disableSystemClipboard: When set to true, this setting disables the ability to use the system clipboard for copying and pasting report items between different instances of the designer.

Editor Settings

The editor property within the DesignerConfig object provides options to configure the appearance and behavior of the report editor, including rulers, grid, and visual guides for aligning report items:

const editorSettings = {
  rulers: {
    visible: true, // Show rulers by default
    snapStep: {
      in: 0.25, // Set snapping step for inches
      cm: 0.5, // Set snapping step for centimeters
    },
  },
  gridSize: "0.5cm", // Set default grid size in centimeters
  showGrid: true, // Show grid by default
  snapToGrid: true, // Enable snap to grid by default
  snapToGuides: false, // Disable snap to guides by default
};

var designerConfig = {
  editor: editorSettings,
};

Application bar and Toolbar Settings

The appBar property within the DesignerConfig object is used to configure the Application Bar of the designer component. This topmost bar includes action buttons like Undo, Redo, and Save, and provides access to various tabs such as Home or Parameters. The toolbar resides beneath the application bar and contains action buttons depending on the currently selected tab.

The following example demonstrates how to set up the Application Bar and the Toolbar:

const appBarSettings = {
  visible: true, // Show the app bar
  homeTab: {
    visible: true, // Show the home tab
  },
  contextActionsTab: {
    visible: false, // Hide the context actions tab
  },
  parametersTab: {
    visible: true, // Show the parameters tab
   },
};

const toolBarSettings = {
  visible: false, // Hide the toolbar
};

var designerConfig = {
  appBar: appBarSettings,
  toolBar: toolBarSettings
};

The menu property within the DesignerConfig object is designed to configure the appearance of elements in the sidebar of the designer. This sidebar expands and collapses via the Hamburger menu icon, located at the top-right side of the designer interface. The following example demonstrates how to configure these menu elements:

const menuSettings = {
  visible: true, // Show the main menu
  toolBox: {
    visible: true, // Show the Tool Box
  },
  documentExplorer: {
    visible: false, // Hide the Document Explorer
  },
  groupEditor: {
    visible: true, // Show the Group Editor
  },
  layerEditor: {
     visible: true, // Show the Layer Editor
  },
  logo: {
    visible: true, // Show the logo
    custom: {
      type: "css",
      class: "fa-solid fa-user",
    },    
  },
};
var designerConfig = {
  menu: menuSettings ,
};

Data tab Settings

The data property within the DesignerConfig object defines the appearance and behavior of the Data tab:

const dataTabSettings = {
  dataTab: {
    visible: true, // Show the Data tab
  },
  dataSources: {
    visible: true, // Show the Data Sources section
    canModify: false, // Do not allow modification of data sources
  },
  dataSets: {
    visible: true, // Show the Data Sets section
    canModify: true, // Allow modification of data sets
  },
  parameters: {
    visible: true, // Show the Parameters section
    canModify: true, // Allow modification of parameters
  },
  commonValues: {
    visible: true, // Show the Common Values section
  },
};
var designerConfig = {
  data: dataTabSettings,
};

Property Grid Settings

The propertyGrid property within the DesignerConfig object configures the appearance and behavior of the Property grid:

const propertyGridSettings = {
  propertiesTab: {
    visible: true, // Show the Properties tab
  },
  mode: "Advanced", // Set the Property Grid mode to "Advanced" or "Basic"
  collapsibleCategories: {
    enabled: true, // Enable collapsible categories
  },
  saveExpandEditorsState: {
    enabled: true, // Remember the expanded/collapsed states of editors
  },
};
var designerConfig = {
  propertyGrid: propertyGridSettings ,
};

Status Bar Settings

The statusBar property within the DesignerConfig object is designed to configure the appearance of elements in the status bar of the designer. This status bar located on the bottom-right side of the designer interface:

const statusBarSettings = {
  visible: true, // Show the status bar
  toggleUnitsButton: {
    visible: true, // Show the units toggle button
  },
  toggleGridButton: {
    visible: false, // Hide the grid toggle button
  },
  gridSizeEditor: {
    visible: true, // Show the grid size editor
  },
  rulersButton: {
    visible: true, // Show the rulers toggle
  },
  propertiesModeButton: {
    visible: false, // Hide the properties mode button
  },
};
var designerConfig = {
  statusBar: statusBarSettings ,
};

Using Designer Config

The DesignerConfig object described above can be passed into the Report Designer component during the initialization.

Pure JS Applications

The constructor of the Report Designer component for PureJS applications accepts a DesignerConfig object as an argument.

var designer = new MESCIUS.ActiveReportsJS.ReportDesigner.Designer(
  "#designer-host",
  designerConfig
);

React Applications

The React Report Designer component exposes the optional onInit property that should resolve to a function that retrieves the DesignerConfig object, for example:

import React from "react";
import { Designer } from "@mescius/activereportsjs-react";

function onInit() {
  return {
      appBar: {visible: false},
  };
}

function App() {
  return (
      <Designer onInit={onInit} />
  );
}

Angular Applications

The Angular Report Designer component exposes the optional onInit input property that should resolve to a function that retrieves the DesignerConfig object, for example:

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

@Component({
  selector: 'app-root',
  template:
    '<div id="designer-host"><gc-activereports-designer [onInit]="onInit"> </gc-activereports-designer></div>'
})
export class AppComponent {
  onInit = function onInit() {
    const editorSettings = {
      rulers: {
        visible: false, 
      },
    }; 
    return {
      editor: editorSettings,
    };
  }  
}

Vue Applications

Similarly, the Vue Report Designer accepts the reference to the onInit function:

<template>
  <div id="designer-host">
    <ReportDesigner
      :onInit="onInit"
    ></ReportDesigner>
  </div>
</template>

<script lang="ts">
import { Designer } from @mescius/activereportsjs-vue";

export default {
  name: "App",
  components: {
    ReportDesigner: Designer,
  },
  methods: {
    onInit() {
      return {
        appBar: { visible: false },
      };
    },
  },
};
</script>

Svelte Applications

The Svelte Report Designer exposes the onInit property that should resolve to a function that returns the DesignerConfig object:

<script lang="ts">
    import {Designer} from "@mescius/activereportsjs-svelte";
    function onInit() {
        return {
            appBar: { visible: false }
        }
    }    
</script>

<div id="designer-host">
    <Designer bind:this={designerInst} onInit={onInit}></Designer>
</div>