[{"id":"5f98443c-9d59-4351-81ad-0910eb2535e7","tags":[{"product":null,"links":null,"id":"27b05819-810b-4ea2-b5ea-2857947ce8be","name":"New","color":"#ed7422","productId":"486064ee-5a7c-4d44-b127-1e19810242b2"}]},{"id":"50134b23-c8f4-4c83-8c49-4f7a4d307585","tags":[{"product":null,"links":null,"id":"7fcf2480-6c1f-4a24-a5be-35a201d1532b","name":"upd","color":"#7e678a","productId":"486064ee-5a7c-4d44-b127-1e19810242b2"}]},{"id":"61551de1-9a9f-4a08-b71e-49ca882827f5","tags":[{"product":null,"links":null,"id":"7fcf2480-6c1f-4a24-a5be-35a201d1532b","name":"upd","color":"#7e678a","productId":"486064ee-5a7c-4d44-b127-1e19810242b2"}]},{"id":"ebf0ce82-0782-496c-bd66-90f5433e31f2","tags":[{"product":null,"links":null,"id":"27b05819-810b-4ea2-b5ea-2857947ce8be","name":"New","color":"#ed7422","productId":"486064ee-5a7c-4d44-b127-1e19810242b2"}]},{"id":"50e4fa24-000f-45f0-8f09-9026e40c30ca","tags":[{"product":null,"links":null,"id":"7fcf2480-6c1f-4a24-a5be-35a201d1532b","name":"upd","color":"#7e678a","productId":"486064ee-5a7c-4d44-b127-1e19810242b2"}]},{"id":"64f01bad-a9ca-47a2-b134-b485adffed2c","tags":[{"product":null,"links":null,"id":"7fcf2480-6c1f-4a24-a5be-35a201d1532b","name":"upd","color":"#7e678a","productId":"486064ee-5a7c-4d44-b127-1e19810242b2"}]},{"id":"57569d12-0bea-4995-9743-1b5efb7dfda6","tags":[{"product":null,"links":null,"id":"7fcf2480-6c1f-4a24-a5be-35a201d1532b","name":"upd","color":"#7e678a","productId":"486064ee-5a7c-4d44-b127-1e19810242b2"}]},{"id":"712bddae-c316-4524-add9-6dd487152146","tags":[{"product":null,"links":null,"id":"27b05819-810b-4ea2-b5ea-2857947ce8be","name":"New","color":"#ed7422","productId":"486064ee-5a7c-4d44-b127-1e19810242b2"}]},{"id":"afb74359-e66d-40e1-a5e2-f7a22468165d","tags":[{"product":null,"links":null,"id":"27b05819-810b-4ea2-b5ea-2857947ce8be","name":"New","color":"#ed7422","productId":"486064ee-5a7c-4d44-b127-1e19810242b2"}]},{"id":"cccfa340-c8a6-43ef-b2cd-f9fe44ce22dc","tags":[{"product":null,"links":null,"id":"27b05819-810b-4ea2-b5ea-2857947ce8be","name":"New","color":"#ed7422","productId":"486064ee-5a7c-4d44-b127-1e19810242b2"}]},{"id":"d404d4eb-0b25-4650-be78-033cc4aa3445","tags":[{"product":null,"links":null,"id":"7fcf2480-6c1f-4a24-a5be-35a201d1532b","name":"upd","color":"#7e678a","productId":"486064ee-5a7c-4d44-b127-1e19810242b2"}]},{"id":"d778e74c-622b-47d6-b0b1-32e741ee6d1a","tags":[{"product":null,"links":null,"id":"27b05819-810b-4ea2-b5ea-2857947ce8be","name":"New","color":"#ed7422","productId":"486064ee-5a7c-4d44-b127-1e19810242b2"}]},{"id":"3103635f-71c9-4a28-8786-45ae6de6a49f","tags":[{"product":null,"links":null,"id":"7fcf2480-6c1f-4a24-a5be-35a201d1532b","name":"upd","color":"#7e678a","productId":"486064ee-5a7c-4d44-b127-1e19810242b2"}]},{"id":"0d56fe97-9840-41da-931f-ad23201cd9e2","tags":[{"product":null,"links":null,"id":"27b05819-810b-4ea2-b5ea-2857947ce8be","name":"New","color":"#ed7422","productId":"486064ee-5a7c-4d44-b127-1e19810242b2"}]},{"id":"c90cdefc-81dd-4d8d-b8fa-ed93585c4b23","tags":[{"product":null,"links":null,"id":"7fcf2480-6c1f-4a24-a5be-35a201d1532b","name":"upd","color":"#7e678a","productId":"486064ee-5a7c-4d44-b127-1e19810242b2"}]},{"id":"5d5d62ca-5108-4421-a925-f2c187eb2aeb","tags":[{"product":null,"links":null,"id":"27b05819-810b-4ea2-b5ea-2857947ce8be","name":"New","color":"#ed7422","productId":"486064ee-5a7c-4d44-b127-1e19810242b2"}]},{"id":"e588ca95-4aba-4e50-a99f-833a98531489","tags":[{"product":null,"links":null,"id":"7fcf2480-6c1f-4a24-a5be-35a201d1532b","name":"upd","color":"#7e678a","productId":"486064ee-5a7c-4d44-b127-1e19810242b2"}]},{"id":"cc378615-c853-4f3e-994b-9a2260cc06a2","tags":[{"product":null,"links":null,"id":"7fcf2480-6c1f-4a24-a5be-35a201d1532b","name":"upd","color":"#7e678a","productId":"486064ee-5a7c-4d44-b127-1e19810242b2"}]},{"id":"4a60e156-0f10-43a2-88bc-9d9691f15137","tags":[{"product":null,"links":null,"id":"7fcf2480-6c1f-4a24-a5be-35a201d1532b","name":"upd","color":"#7e678a","productId":"486064ee-5a7c-4d44-b127-1e19810242b2"}]},{"id":"938d62d7-9526-479f-9798-31d0f9f58588","tags":[{"product":null,"links":null,"id":"7fcf2480-6c1f-4a24-a5be-35a201d1532b","name":"upd","color":"#7e678a","productId":"486064ee-5a7c-4d44-b127-1e19810242b2"}]},{"id":"9e4f342b-5dcb-4548-a84c-afe71cf5d736","tags":[{"product":null,"links":null,"id":"7fcf2480-6c1f-4a24-a5be-35a201d1532b","name":"upd","color":"#7e678a","productId":"486064ee-5a7c-4d44-b127-1e19810242b2"}]},{"id":"0d50ab1e-81c0-49b2-b8cb-1f50a6f3e12b","tags":[{"product":null,"links":null,"id":"7fcf2480-6c1f-4a24-a5be-35a201d1532b","name":"upd","color":"#7e678a","productId":"486064ee-5a7c-4d44-b127-1e19810242b2"}]},{"id":"0a0c904c-bbb2-4abe-a626-a06200fb57fe","tags":[{"product":null,"links":null,"id":"7fcf2480-6c1f-4a24-a5be-35a201d1532b","name":"upd","color":"#7e678a","productId":"486064ee-5a7c-4d44-b127-1e19810242b2"}]},{"id":"224e6263-b410-4f17-8822-e19f965c509d","tags":[{"product":null,"links":null,"id":"7fcf2480-6c1f-4a24-a5be-35a201d1532b","name":"upd","color":"#7e678a","productId":"486064ee-5a7c-4d44-b127-1e19810242b2"}]},{"id":"74546345-b13f-4465-a716-7bc0f9c19730","tags":[{"product":null,"links":null,"id":"7fcf2480-6c1f-4a24-a5be-35a201d1532b","name":"upd","color":"#7e678a","productId":"486064ee-5a7c-4d44-b127-1e19810242b2"}]},{"id":"60452ec3-5f68-4e01-b8f0-22ea893bf4ce","tags":[{"product":null,"links":null,"id":"27b05819-810b-4ea2-b5ea-2857947ce8be","name":"New","color":"#ed7422","productId":"486064ee-5a7c-4d44-b127-1e19810242b2"}]},{"id":"8c3493e9-e62c-45b7-9268-825db731f79b","tags":[{"product":null,"links":null,"id":"27b05819-810b-4ea2-b5ea-2857947ce8be","name":"New","color":"#ed7422","productId":"486064ee-5a7c-4d44-b127-1e19810242b2"}]}]
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.
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.
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.
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,
};
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 ,
};
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,
};
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 ,
};
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 ,
};
The DesignerConfig
object described above can be passed into the Report Designer component during the initialization.
The constructor of the Report Designer component for PureJS applications accepts a DesignerConfig
object as an argument.
var designer = new GC.ActiveReports.ReportDesigner.Designer(
"#designer-host",
designerConfig
);
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 "@grapecity/activereports-react";
function onInit() {
return {
appBar: {visible: false},
};
}
function App() {
return (
<Designer onInit={onInit} />
);
}
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,
};
}
}
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 "@grapecity/activereports-vue";
export default {
name: "App",
components: {
ReportDesigner: Designer,
},
methods: {
onInit() {
return {
appBar: { visible: false },
};
},
},
};
</script>
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 "@grapecity/activereports-svelte";
function onInit() {
return {
appBar: { visible: false }
}
}
</script>
<div id="designer-host">
<Designer bind:this={designerInst} onInit={onInit}></Designer>
</div>