Flexmonster Software License Agreement (“Agreement”) has been significantly revised and is effective as of September 30, 2024.
The following modifications were made:
The modified version of Flexmonster Software License Agreement is available here.
Downloading, installing, and/or continuing to use Flexmonster Software after September 30, 2024, constitutes Licensee’s acceptance of the terms and conditions of the modified version of Flexmonster Software License Agreement. If Licensee does not agree to any of these terms and conditions, they must cease using Flexmonster Software and must not download, install, use, access, or continue to access Flexmonster Software. By continuing to use Flexmonster Software or renewing the license under License Model or Maintenance after the effective date of any modifications to Agreement, Licensee accepts and agrees to be bound by the terms and conditions of the modified Agreement.
This guide shows how to specify configurations that will be common for all reports using the GlobalObject. The following configurations can be specified for all reports:
The GlobalObject should be considered as a global parent report. The component will use the global value if a specific configuration is not explicitly set in the report.
To specify a data source for all reports, configure the global.dataSource property:
global: { dataSource: { filename: "https://cdn.flexmonster.com/data/data.csv" } }
For more info about available data source configurations, check out the Data source guide.
To specify options for all reports, configure the global.options property.
The following example demonstrates how to specify the readOnly option for all reports:
global: { options: { readOnly: true } }
In the next example, we apply date and time formatting for all reports using the datePattern option:
global: { options: { datePattern: "'Date: 'MM/dd/yy" } }
Read more about available options in the Options guide.
To specify a localization for all reports, configure the global.localization property:
global: {
localization: "loc/es.json"
}
To learn more about localization, read the Localizing the component guide.
The current report is usually obtained via the save() or getReport() API calls. By default, reports returned by these methods contain only the configurations that were explicitly specified inside the ReportObject.
For example, we have the component defined like this:
let pivot = new Flexmonster({
container: "pivotContainer",
componentFolder: "node_modules/flexmonster/",
global: {
localization: "loc/es.json"
},
report: {
dataSource: {
filename: "https://cdn.flexmonster.com/data/data.csv"
}
}
});
By default, save()
and getReport()
will return the report with the specified dataSource
property, but without the localization
. Use the withGlobals: true
parameter in the API calls to include the localization
that was defined in the global
parameter:
pivot.save({
withGlobals: true
});
pivot.getReport({
withGlobals: true
});
You may be interested in the following articles: