Introduction
The Reports Config widget is a UI that simplifies the creation, modification, and extraction of Reports within the Reporting Platform. This tutorial will guide you through some basic steps and provide references to set up a viewer application for Reports Config Widget.
By the end of this walk-through, you will be able to have an iTwin viewer with quick access to all your reports.
Info
Skill level:
Basic
Duration:
10 minutes
Prerequisite
This tutorial assumes that you already have:
- Your own local source for the iTwin Web Viewer. Please refer to the quick start instructions.
iTwin Web Viewer Quick Start Instructions
Permissions and Scopes
Do not forget to put these values within the IMJS_AUTH_CLIENT_SCOPES
environment variable.
In addition, users must have the imodels_read
and imodels_write
permissions assigned at either the Project or iModel level. Further instruction on how to create roles and assign permissions can be found in the iTwin Platform Access Control API documentation.
itwin-platform
Adding the Reports Config Widget
The first step required by the widget is to initialize it before making use of the provider. This will initialize the widget’s localization.
Next, you must add the ReportsConfigProvider
to the list of uiProviders
within the viewer component.
More details on adding uiProviders
can be shown in this tutorial.
Congratulations, you should now have the Reports Config widget within your iTwin Viewer application.
useEffect(() => {
ReportsConfigWidget.initialize(IModelApp.localization);
})
<Viewer
iTwinId={iTwinId}
iModelId={iModelId}
authClient={authClient}
viewCreatorOptions={viewCreatorOptions}
enablePerformanceMonitors={true}
uiProviders={[new ReportsConfigProvider()]}
/>