@progress/telerik-react-report-viewer 29.26.211 → 29.26.402
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/cjs/reportViewer.js +18 -7
- package/dist/cjs/telerik-report-viewer.js +343 -330
- package/dist/dependencies/telerikReportViewer.d.ts +85 -83
- package/dist/dependencies/telerikReportViewer.js +303 -95
- package/dist/dependencies/telerikReportViewerTemplate.html +5 -5
- package/dist/es/reportViewer.js +14 -3
- package/dist/es/telerik-report-viewer.js +343 -330
- package/package.json +2 -2
|
@@ -17,8 +17,7 @@ import { ReportViewer } from '../dependencies/telerikReportViewer.js';
|
|
|
17
17
|
* - Default: "LIST_VIEW"
|
|
18
18
|
*
|
|
19
19
|
* @example
|
|
20
|
-
* //
|
|
21
|
-
*
|
|
20
|
+
* // Specify editor types for report parameters
|
|
22
21
|
* <TelerikReportViewer
|
|
23
22
|
* serviceUrl="api/reports/"
|
|
24
23
|
* reportSource={{ report: "Dashboard.trdp" }}
|
|
@@ -49,19 +48,19 @@ import { ReportViewer } from '../dependencies/telerikReportViewer.js';
|
|
|
49
48
|
|
|
50
49
|
/**
|
|
51
50
|
* Configuration for connecting to a Telerik Report Server instance.
|
|
52
|
-
*
|
|
51
|
+
*
|
|
53
52
|
* The authentication method depends on the Report Server version:
|
|
54
53
|
* - Report Server for .NET: Supports Token authentication (getPersonalAccessToken) or username/password authentication. The token can be from any user, including the Guest user.
|
|
55
54
|
* - Report Server for .NET Framework 4.6.2: Supports username/password authentication or Guest account (url only, if Guest is enabled on the server).
|
|
56
|
-
*
|
|
55
|
+
*
|
|
57
56
|
* @typedef {Object} ReportServer
|
|
58
|
-
* @property {string} url - The URL
|
|
59
|
-
* @property {function} [getPersonalAccessToken] - A callback
|
|
60
|
-
* @property {string} [username] - A registered username
|
|
61
|
-
* @property {string} [password] - The password for the provided username.
|
|
57
|
+
* @property {string} url - The URL of the Telerik Report Server instance.
|
|
58
|
+
* @property {function} [getPersonalAccessToken] - A callback that returns a Promise resolving to a Personal Access Token for authentication. Recommended for Report Server for .NET. The token can be from any user account, including the Guest user.
|
|
59
|
+
* @property {string} [username] - A registered username for Report Server authentication. Supported by both Report Server for .NET and Report Server for .NET Framework. When omitted with Report Server for .NET Framework and Guest enabled, the built-in Guest account is used.
|
|
60
|
+
* @property {string} [password] - The password for the provided username. Can be omitted only when connecting with the Guest account to Report Server for .NET Framework.
|
|
62
61
|
*
|
|
63
62
|
* @example <propertyName>getPersonalAccessToken</propertyName>
|
|
64
|
-
* //
|
|
63
|
+
* // Report Server for .NET - Token authentication (recommended)
|
|
65
64
|
* <TelerikReportViewer
|
|
66
65
|
* reportServer={{
|
|
67
66
|
* url: "https://my-report-server-net/",
|
|
@@ -73,7 +72,7 @@ import { ReportViewer } from '../dependencies/telerikReportViewer.js';
|
|
|
73
72
|
* />
|
|
74
73
|
*
|
|
75
74
|
* @example <propertyName>getPersonalAccessToken</propertyName>
|
|
76
|
-
* //
|
|
75
|
+
* // Report Server for .NET - Token authentication with a secure endpoint
|
|
77
76
|
* <TelerikReportViewer
|
|
78
77
|
* reportServer={{
|
|
79
78
|
* url: "https://my-report-server-net/",
|
|
@@ -86,7 +85,7 @@ import { ReportViewer } from '../dependencies/telerikReportViewer.js';
|
|
|
86
85
|
* />
|
|
87
86
|
*
|
|
88
87
|
* @example <propertyName>getPersonalAccessToken</propertyName>
|
|
89
|
-
* //
|
|
88
|
+
* // Report Server for .NET - Token authentication with Guest user token
|
|
90
89
|
* <TelerikReportViewer
|
|
91
90
|
* reportServer={{
|
|
92
91
|
* url: "https://my-report-server-net/",
|
|
@@ -98,7 +97,7 @@ import { ReportViewer } from '../dependencies/telerikReportViewer.js';
|
|
|
98
97
|
* />
|
|
99
98
|
*
|
|
100
99
|
* @example <propertyName>username</propertyName>
|
|
101
|
-
* //
|
|
100
|
+
* // Report Server for .NET - Username/password authentication
|
|
102
101
|
* <TelerikReportViewer
|
|
103
102
|
* reportServer={{
|
|
104
103
|
* url: "https://my-report-server-net/",
|
|
@@ -109,7 +108,7 @@ import { ReportViewer } from '../dependencies/telerikReportViewer.js';
|
|
|
109
108
|
* />
|
|
110
109
|
*
|
|
111
110
|
* @example <propertyName>username</propertyName>
|
|
112
|
-
* //
|
|
111
|
+
* // Report Server for .NET Framework - Username/password authentication
|
|
113
112
|
* <TelerikReportViewer
|
|
114
113
|
* reportServer={{
|
|
115
114
|
* url: "https://my-report-server-framework/",
|
|
@@ -120,7 +119,7 @@ import { ReportViewer } from '../dependencies/telerikReportViewer.js';
|
|
|
120
119
|
* />
|
|
121
120
|
*
|
|
122
121
|
* @example <propertyName>url</propertyName>
|
|
123
|
-
* //
|
|
122
|
+
* // Report Server for .NET Framework - Guest account (requires Guest enabled on server)
|
|
124
123
|
* <TelerikReportViewer
|
|
125
124
|
* reportServer={{
|
|
126
125
|
* url: "https://my-report-server-framework/"
|
|
@@ -129,7 +128,7 @@ import { ReportViewer } from '../dependencies/telerikReportViewer.js';
|
|
|
129
128
|
* />
|
|
130
129
|
*
|
|
131
130
|
* @example <propertyName>reportServer</propertyName>
|
|
132
|
-
* //
|
|
131
|
+
* // Complete initialization with Report Server for .NET using Token authentication
|
|
133
132
|
* <TelerikReportViewer
|
|
134
133
|
* reportServer={{
|
|
135
134
|
* url: "https://my-report-server-net/",
|
|
@@ -149,19 +148,19 @@ import { ReportViewer } from '../dependencies/telerikReportViewer.js';
|
|
|
149
148
|
/**
|
|
150
149
|
* Configuration object that identifies the report to be displayed and provides initial parameter values.
|
|
151
150
|
* @typedef {Object} ReportSource
|
|
152
|
-
* @property {string} [report] - A string
|
|
153
|
-
* @property {ReportParameters} [parameters] -
|
|
151
|
+
* @property {string} [report] - A string identifying the report to display. This can be a path to a report definition file (e.g., 'Dashboard.trdp' or 'Dashboard.trdx'), a type name, or a custom identifier resolved by the server-side report source resolver. For Report Server, use the format '{Category}/{ReportName}'.
|
|
152
|
+
* @property {ReportParameters} [parameters] - An object whose keys are report parameter names and values are the corresponding parameter values.
|
|
154
153
|
*
|
|
155
154
|
* @example <propertyName>report</propertyName>
|
|
156
|
-
* //
|
|
155
|
+
* // Minimal report source with only the report file name
|
|
157
156
|
* const reportSource = {
|
|
158
|
-
* report: "MyReport"
|
|
157
|
+
* report: "MyReport.trdp"
|
|
159
158
|
* };
|
|
160
159
|
*
|
|
161
160
|
* @example <propertyName>parameters</propertyName>
|
|
162
|
-
* //
|
|
161
|
+
* // Report source with parameters
|
|
163
162
|
* const reportSource = {
|
|
164
|
-
* report: "SalesReport",
|
|
163
|
+
* report: "SalesReport.trdp",
|
|
165
164
|
* parameters: {
|
|
166
165
|
* StartDate: "2024-01-01",
|
|
167
166
|
* EndDate: "2024-12-31",
|
|
@@ -170,13 +169,13 @@ import { ReportViewer } from '../dependencies/telerikReportViewer.js';
|
|
|
170
169
|
* };
|
|
171
170
|
*
|
|
172
171
|
* @example <propertyName>report</propertyName>
|
|
173
|
-
* //
|
|
172
|
+
* // Report Server format
|
|
174
173
|
* const reportSource = {
|
|
175
174
|
* report: "Finance/MonthlyReport"
|
|
176
175
|
* };
|
|
177
176
|
*
|
|
178
177
|
* @example
|
|
179
|
-
* //
|
|
178
|
+
* // Using ReportSource with the React Report Viewer
|
|
180
179
|
* <TelerikReportViewer
|
|
181
180
|
* serviceUrl="api/reports/"
|
|
182
181
|
* reportSource={{
|
|
@@ -212,8 +211,8 @@ import { ReportViewer } from '../dependencies/telerikReportViewer.js';
|
|
|
212
211
|
* @property {string} [to] - E-mail address used for the MailMessage TO value.
|
|
213
212
|
* @property {string} [cc] - E-mail address used for the MailMessage Carbon Copy value.
|
|
214
213
|
* @property {string} [subject] - A string used for the MailMessage Subject value.
|
|
215
|
-
* @property {string} [body] -
|
|
216
|
-
* @property {string} [format] - The preselected report
|
|
214
|
+
* @property {string} [body] - Text content for the email body.
|
|
215
|
+
* @property {string} [format] - The preselected document format for the report attachment (e.g., 'PDF', 'XLSX').
|
|
217
216
|
*
|
|
218
217
|
* @example
|
|
219
218
|
* // Enable Send Email with default values and PDF as the default format
|
|
@@ -245,63 +244,79 @@ import { ReportViewer } from '../dependencies/telerikReportViewer.js';
|
|
|
245
244
|
|
|
246
245
|
/**
|
|
247
246
|
* Represents the API of a parameter editor instance returned by createEditor.
|
|
247
|
+
*
|
|
248
|
+
* Implementations must provide `beginEdit`, `addAccessibility`, and `setAccessibilityErrorState`.
|
|
249
|
+
* The viewer calls `addAccessibility` / `setAccessibilityErrorState` when `enableAccessibility` is true.
|
|
250
|
+
* Optional members like `clearPendingChange` and `destroy` are lifecycle hooks for editors
|
|
251
|
+
* that manage external widgets or pending async updates.
|
|
248
252
|
* @typedef {Object} ParameterEditorInstance
|
|
249
253
|
* @property {function(Object):void} beginEdit - Creates the editor UI and populates it with the parameter settings.
|
|
250
|
-
* @property {function(Object):void} addAccessibility - Adds accessibility to the parameter editor and populates its string resources.
|
|
251
|
-
* @property {function(Object):void} setAccessibilityErrorState - Sets the error state of the parameter editor's accessibility functionality and its error attributes.
|
|
252
|
-
* @
|
|
253
|
-
* @property {function():void}
|
|
254
|
-
* @property {function():void} [
|
|
254
|
+
* @property {function(Object):void} addAccessibility - Adds accessibility to the parameter editor and populates its string resources. Called by the viewer when `enableAccessibility` is true.
|
|
255
|
+
* @property {function(Object):void} setAccessibilityErrorState - Sets the error state of the parameter editor's accessibility functionality and its error attributes. Called by the viewer when `enableAccessibility` is true and the user changes value.
|
|
256
|
+
* @internal
|
|
257
|
+
* @property {function(boolean):void} enable - Enables or disables the parameter editor (e.g., when the "use default value" checkbox is toggled).
|
|
258
|
+
* @property {function():void} [clearPendingChange] - Invoked when parameter changes.
|
|
259
|
+
* @property {function():void} [destroy] - Invoked to destroy the parameter editor.
|
|
255
260
|
*/
|
|
256
261
|
|
|
257
262
|
/**
|
|
258
|
-
* Describes a parameter editor for the Telerik Report Viewer
|
|
263
|
+
* Describes a parameter editor for the Telerik Report Viewer parameters area.
|
|
259
264
|
* @typedef {Object} ParameterEditor
|
|
260
265
|
* @property {function(Object): boolean} match - Determines if the editor is suitable for the parameter.
|
|
261
|
-
* @property {function(HTMLElement, Object): ParameterEditorInstance} createEditor - Creates the editor UI.
|
|
266
|
+
* @property {function(HTMLElement, Object): ParameterEditorInstance} createEditor - Creates the editor UI and returns an editor instance.
|
|
262
267
|
* @example
|
|
263
|
-
* //
|
|
264
|
-
*
|
|
265
|
-
* // Use parameter properties to determine if this editor should be used
|
|
268
|
+
* // Custom match function for single-select parameters
|
|
269
|
+
* function match(parameter) {
|
|
266
270
|
* return Boolean(parameter.availableValues) && !parameter.multivalue;
|
|
267
|
-
* }
|
|
271
|
+
* }
|
|
268
272
|
*
|
|
269
273
|
* @example
|
|
270
|
-
* //
|
|
274
|
+
* // Custom createEditor function using Kendo DateTimePicker
|
|
271
275
|
* function match(parameter) {
|
|
272
276
|
* return parameter.type === "System.DateTime";
|
|
273
277
|
* }
|
|
274
278
|
*
|
|
275
279
|
* function createEditor(placeholder, options) {
|
|
276
|
-
*
|
|
277
|
-
* parameter
|
|
278
|
-
* valueChangedCallback = options.parameterChanged
|
|
279
|
-
*
|
|
280
|
+
* const container = $(placeholder).html('<input type="datetime"/>');
|
|
281
|
+
* let parameter;
|
|
282
|
+
* const valueChangedCallback = options.parameterChanged;
|
|
283
|
+
* let picker;
|
|
284
|
+
*
|
|
280
285
|
* function onChange() {
|
|
281
|
-
*
|
|
286
|
+
* const val = picker.value();
|
|
282
287
|
* valueChangedCallback(parameter, val);
|
|
283
288
|
* }
|
|
289
|
+
*
|
|
284
290
|
* return {
|
|
285
291
|
* beginEdit: function (param) {
|
|
286
292
|
* parameter = param;
|
|
287
|
-
* $(
|
|
293
|
+
* $(container).find("input").kendoDateTimePicker({
|
|
288
294
|
* dataTextField: "name",
|
|
289
295
|
* dataValueField: "value",
|
|
290
296
|
* value: parameter.value,
|
|
291
297
|
* dataSource: parameter.availableValues,
|
|
292
298
|
* change: onChange
|
|
293
299
|
* });
|
|
294
|
-
*
|
|
300
|
+
* picker = $(container).find("input").data("kendoDateTimePicker");
|
|
301
|
+
* },
|
|
302
|
+
*
|
|
303
|
+
* addAccessibility: function (accessibilityOptions) {
|
|
304
|
+
* // Apply ARIA attributes, labels, etc. to the editor input.
|
|
305
|
+
* },
|
|
306
|
+
*
|
|
307
|
+
* setAccessibilityErrorState: function (hasError) {
|
|
308
|
+
* // Update ARIA error attributes on the editor input.
|
|
295
309
|
* }
|
|
296
310
|
* };
|
|
297
311
|
* }
|
|
298
312
|
*
|
|
299
313
|
* @example
|
|
300
|
-
* //
|
|
301
|
-
*
|
|
302
|
-
*
|
|
303
|
-
*
|
|
304
|
-
* }
|
|
314
|
+
* // Registering a custom parameter editor
|
|
315
|
+
* <TelerikReportViewer
|
|
316
|
+
* serviceUrl="api/reports/"
|
|
317
|
+
* reportSource={{ report: "Dashboard.trdp" }}
|
|
318
|
+
* parameterEditors={[{ match, createEditor }]}
|
|
319
|
+
* />
|
|
305
320
|
*
|
|
306
321
|
*/
|
|
307
322
|
|
|
@@ -349,7 +364,7 @@ import { ReportViewer } from '../dependencies/telerikReportViewer.js';
|
|
|
349
364
|
* reportSource={{ report: "Finance/Dashboard" }}
|
|
350
365
|
* />
|
|
351
366
|
*
|
|
352
|
-
* @property {string} [templateUrl] - Sets the address of the
|
|
367
|
+
* @property {string} [templateUrl] - Sets the address of the HTML page that contains the viewer templates. If omitted, the default template will be downloaded from the REST service.
|
|
353
368
|
* @example <propertyName>templateUrl</propertyName>
|
|
354
369
|
* // Use a custom template
|
|
355
370
|
* <TelerikReportViewer
|
|
@@ -461,45 +476,90 @@ import { ReportViewer } from '../dependencies/telerikReportViewer.js';
|
|
|
461
476
|
* }}
|
|
462
477
|
* />
|
|
463
478
|
*
|
|
464
|
-
* @property {ParameterEditor} [parameterEditors] - Allows the user to define custom editors for the report parameters.
|
|
479
|
+
* @property {ParameterEditor[]} [parameterEditors] - Allows the user to define custom editors for the report parameters.
|
|
465
480
|
* @example <propertyName>parameterEditors</propertyName>
|
|
466
481
|
* // Register custom parameter editors
|
|
467
482
|
* const customEditors = [{
|
|
468
483
|
* match: function(param) { return param.name === "MyParam"; },
|
|
469
|
-
* createEditor: function(placeholder, options) {
|
|
484
|
+
* createEditor: function(placeholder, options) {
|
|
485
|
+
* return {
|
|
486
|
+
* beginEdit: function(param) {
|
|
487
|
+
* // Create and initialize the editor UI inside placeholder.
|
|
488
|
+
* },
|
|
489
|
+
* addAccessibility: function(accessibilityOptions) {
|
|
490
|
+
* // Apply ARIA attributes and accessibility strings.
|
|
491
|
+
* },
|
|
492
|
+
* setAccessibilityErrorState: function(hasError) {
|
|
493
|
+
* // Update accessibility error state on the editor.
|
|
494
|
+
* }
|
|
495
|
+
* };
|
|
496
|
+
* }
|
|
470
497
|
* }];
|
|
471
|
-
*
|
|
498
|
+
*
|
|
499
|
+
* <TelerikReportViewer
|
|
500
|
+
* serviceUrl="api/reports/"
|
|
501
|
+
* reportSource={{ report: "Dashboard.trdp" }}
|
|
502
|
+
* parameterEditors={customEditors}
|
|
503
|
+
* />
|
|
472
504
|
*
|
|
473
505
|
* @property {string} [authenticationToken] - If provided, a Bearer token will be set in the Authorization header for every request to the REST service.
|
|
474
506
|
* @example <propertyName>authenticationToken</propertyName>
|
|
475
|
-
* // Set authentication token
|
|
476
|
-
*
|
|
477
|
-
*
|
|
507
|
+
* // Set a Bearer authentication token for REST service requests
|
|
508
|
+
* <TelerikReportViewer
|
|
509
|
+
* serviceUrl="api/reports/"
|
|
510
|
+
* reportSource={{ report: "Dashboard.trdp" }}
|
|
511
|
+
* authenticationToken="YOUR_AUTH_TOKEN"
|
|
512
|
+
* />
|
|
478
513
|
*
|
|
479
514
|
* @property {string} [printMode] - Specifies how the viewer should print reports. Available values: "AUTO_SELECT" (automatically decide based on browser), "FORCE_PDF_FILE" (download as PDF file), "FORCE_PDF_PLUGIN" (use PDF plug-in). Default value is "AUTO_SELECT".
|
|
480
515
|
* @example <propertyName>printMode</propertyName>
|
|
481
|
-
* // Force PDF file for printing
|
|
482
|
-
*
|
|
516
|
+
* // Force PDF file download for printing
|
|
517
|
+
* <TelerikReportViewer
|
|
518
|
+
* serviceUrl="api/reports/"
|
|
519
|
+
* reportSource={{ report: "Dashboard.trdp" }}
|
|
520
|
+
* printMode="FORCE_PDF_FILE"
|
|
521
|
+
* />
|
|
483
522
|
*
|
|
484
|
-
* @property {string} [selector] - A selector
|
|
523
|
+
* @property {string} [selector] - A CSS selector that identifies the viewer's container element. Required when using external command buttons via data-attributes. External buttons must set their `data-target-report-viewer` attribute to this same value so the viewer can resolve which instance to command and apply `disabledButtonClass` / `checkedButtonClass` toggling.
|
|
485
524
|
* @example <propertyName>selector</propertyName>
|
|
486
|
-
* //
|
|
487
|
-
*
|
|
525
|
+
* // The selector must match the viewer's own container id (same value used in data-target-report-viewer on external buttons)
|
|
526
|
+
* <TelerikReportViewer
|
|
527
|
+
* id="rv1"
|
|
528
|
+
* serviceUrl="api/reports/"
|
|
529
|
+
* reportSource={{ report: "Dashboard.trdp" }}
|
|
530
|
+
* selector="#rv1"
|
|
531
|
+
* disabledButtonClass="btn-disabled"
|
|
532
|
+
* checkedButtonClass="btn-checked"
|
|
533
|
+
* />
|
|
488
534
|
*
|
|
489
|
-
*
|
|
535
|
+
* // External buttons reference the same selector in data-target-report-viewer:
|
|
536
|
+
* // <button data-command="telerik_ReportViewer_goToNextPage" data-target-report-viewer="#rv1">Next</button>
|
|
537
|
+
*
|
|
538
|
+
* @property {string} [disabledButtonClass] - A CSS class added to external command buttons (bound via data-attributes) when the command is in a disabled state.
|
|
490
539
|
* @example <propertyName>disabledButtonClass</propertyName>
|
|
491
|
-
* //
|
|
492
|
-
*
|
|
540
|
+
* // Apply custom styling to disabled command buttons
|
|
541
|
+
* <TelerikReportViewer
|
|
542
|
+
* id="rv1"
|
|
543
|
+
* serviceUrl="api/reports/"
|
|
544
|
+
* reportSource={{ report: "Dashboard.trdp" }}
|
|
545
|
+
* selector="#rv1"
|
|
546
|
+
* disabledButtonClass="btn-disabled"
|
|
547
|
+
* />
|
|
493
548
|
*
|
|
494
|
-
* @property {string} [checkedButtonClass] - A class
|
|
549
|
+
* @property {string} [checkedButtonClass] - A CSS class added to external command buttons (bound via data-attributes) when the command is in a checked state.
|
|
495
550
|
* @example <propertyName>checkedButtonClass</propertyName>
|
|
496
|
-
* //
|
|
497
|
-
*
|
|
551
|
+
* // Apply custom styling to checked/active command buttons
|
|
552
|
+
* <TelerikReportViewer
|
|
553
|
+
* id="rv1"
|
|
554
|
+
* serviceUrl="api/reports/"
|
|
555
|
+
* reportSource={{ report: "Dashboard.trdp" }}
|
|
556
|
+
* selector="#rv1"
|
|
557
|
+
* checkedButtonClass="btn-active"
|
|
558
|
+
* />
|
|
498
559
|
*
|
|
499
560
|
* @property {boolean} [enableAccessibility] - Determines whether the viewer should provide support for accessibility features. Default value is false.
|
|
500
561
|
* @example <propertyName>enableAccessibility</propertyName>
|
|
501
562
|
* // Enable accessibility features
|
|
502
|
-
* // Use with component: enableAccessibility={true}
|
|
503
563
|
* <TelerikReportViewer
|
|
504
564
|
* serviceUrl="api/reports/"
|
|
505
565
|
* reportSource={{ report: "Dashboard.trdp" }}
|
|
@@ -560,7 +620,7 @@ import { ReportViewer } from '../dependencies/telerikReportViewer.js';
|
|
|
560
620
|
* initialPageAreaImageUrl="/images/reportBackground.png"
|
|
561
621
|
* />
|
|
562
622
|
*
|
|
563
|
-
* @property {boolean} [keepClientAlive] - Determines whether the client
|
|
623
|
+
* @property {boolean} [keepClientAlive] - Determines whether the viewer sends periodic keep-alive requests to the server to prevent the client session from expiring. Default value is true.
|
|
564
624
|
* @example <propertyName>keepClientAlive</propertyName>
|
|
565
625
|
* // Keep client alive
|
|
566
626
|
* <TelerikReportViewer
|
|
@@ -582,6 +642,19 @@ import { ReportViewer } from '../dependencies/telerikReportViewer.js';
|
|
|
582
642
|
* }}
|
|
583
643
|
* />
|
|
584
644
|
*
|
|
645
|
+
* @property {Object} [localizationResources] - An object containing all or a subset of the viewer's localization resources in a chosen language.
|
|
646
|
+
* @example <propertyName>localizationResources</propertyName>
|
|
647
|
+
* // Set localization resources
|
|
648
|
+
* <TelerikReportViewer
|
|
649
|
+
* serviceUrl="api/reports/"
|
|
650
|
+
* reportSource={{ report: "Dashboard.trdp" }}
|
|
651
|
+
* localizationResources={{
|
|
652
|
+
* loadingFormats: "Loading...",
|
|
653
|
+
* loadingReport: "Loading report...",
|
|
654
|
+
* loadingParameters: "Loading parameters...",
|
|
655
|
+
* }}
|
|
656
|
+
* />
|
|
657
|
+
*
|
|
585
658
|
* @property {function} [ready] - A callback function that is called when the viewer content has been loaded from the template and is ready to display reports or perform any other operations.
|
|
586
659
|
* @example <propertyName>ready</propertyName>
|
|
587
660
|
* // Ready callback
|
|
@@ -643,11 +716,9 @@ import { ReportViewer } from '../dependencies/telerikReportViewer.js';
|
|
|
643
716
|
* serviceUrl="api/reports/"
|
|
644
717
|
* reportSource={{ report: "Dashboard.trdp" }}
|
|
645
718
|
* renderingBegin={(e, args) => {
|
|
646
|
-
* //
|
|
647
|
-
*
|
|
648
|
-
* args.deviceInfo["
|
|
649
|
-
* args.deviceInfo["CurrentUICulture"] = culture;
|
|
650
|
-
* console.log("About to render the report.");
|
|
719
|
+
* // Use deviceInfo to set a specific culture for rendering
|
|
720
|
+
* args.deviceInfo["CurrentCulture"] = "de-DE";
|
|
721
|
+
* args.deviceInfo["CurrentUICulture"] = "de-DE";
|
|
651
722
|
* }}
|
|
652
723
|
* />
|
|
653
724
|
*
|
|
@@ -854,7 +925,9 @@ export class TelerikReportViewer extends React.Component {
|
|
|
854
925
|
documentMapVisible: this.props.documentMapVisible,
|
|
855
926
|
documentMapAreaPosition: this.props.documentMapAreaPosition,
|
|
856
927
|
parametersAreaPosition: this.props.parametersAreaPosition,
|
|
857
|
-
keepClientAlive: keepClientAlive
|
|
928
|
+
keepClientAlive: keepClientAlive,
|
|
929
|
+
localizationResources: this.props.localizationResources,
|
|
930
|
+
wrapper: "react"
|
|
858
931
|
});
|
|
859
932
|
this.commands = this.viewerObject.commands;
|
|
860
933
|
}
|
|
@@ -903,7 +976,7 @@ export class TelerikReportViewer extends React.Component {
|
|
|
903
976
|
/**
|
|
904
977
|
* Sets the report source - report and parameters. Automatically reloads the report (if any) into the view.
|
|
905
978
|
* @function
|
|
906
|
-
* @param {{report: string, parameters: Object}}
|
|
979
|
+
* @param {{report: string, parameters: Object}} reportSource - The report source object to set. Object with properties: report (string) and parameters (JSON).
|
|
907
980
|
* @returns {TelerikReportViewer} The current ReportViewer object.
|
|
908
981
|
* @example
|
|
909
982
|
* // Set a new report source
|
|
@@ -912,8 +985,8 @@ export class TelerikReportViewer extends React.Component {
|
|
|
912
985
|
* parameters: { StartDate: "2024-01-01", EndDate: "2024-12-31" }
|
|
913
986
|
* });
|
|
914
987
|
*/
|
|
915
|
-
setReportSource(
|
|
916
|
-
return this.viewerObject.reportSource(
|
|
988
|
+
setReportSource(reportSource) {
|
|
989
|
+
return this.viewerObject.reportSource(reportSource);
|
|
917
990
|
}
|
|
918
991
|
|
|
919
992
|
/**
|
|
@@ -930,16 +1003,16 @@ export class TelerikReportViewer extends React.Component {
|
|
|
930
1003
|
}
|
|
931
1004
|
|
|
932
1005
|
/**
|
|
933
|
-
* Sets the view mode and automatically reloads the current report
|
|
1006
|
+
* Sets the view mode and automatically reloads the current report into the new view.
|
|
934
1007
|
* @function
|
|
935
|
-
* @param {string}
|
|
1008
|
+
* @param {string} viewMode - The view mode to set ("INTERACTIVE" or "PRINT_PREVIEW").
|
|
936
1009
|
* @returns {TelerikReportViewer} The current ReportViewer object.
|
|
937
1010
|
* @example
|
|
938
1011
|
* // Set view mode to print preview
|
|
939
1012
|
* reportViewerRef.current.setViewMode("PRINT_PREVIEW");
|
|
940
1013
|
*/
|
|
941
|
-
setViewMode(
|
|
942
|
-
return this.viewerObject.viewMode(
|
|
1014
|
+
setViewMode(viewMode) {
|
|
1015
|
+
return this.viewerObject.viewMode(viewMode);
|
|
943
1016
|
}
|
|
944
1017
|
|
|
945
1018
|
/**
|
|
@@ -1008,9 +1081,9 @@ export class TelerikReportViewer extends React.Component {
|
|
|
1008
1081
|
}
|
|
1009
1082
|
|
|
1010
1083
|
/**
|
|
1011
|
-
* Gets the shortcut keys used when the report viewer is in accessible mode (enableAccessibility=true).
|
|
1084
|
+
* Gets the shortcut keys used when the report viewer is in accessible mode (enableAccessibility={true}).
|
|
1012
1085
|
* @function
|
|
1013
|
-
* @returns {Object} The current accessibility key map.
|
|
1086
|
+
* @returns {Object|undefined} The current accessibility key map, or undefined if accessibility is not enabled.
|
|
1014
1087
|
* @example
|
|
1015
1088
|
* // Get accessibility key map
|
|
1016
1089
|
* const keyMap = reportViewerRef.current.getAccessibilityKeyMap();
|
|
@@ -1023,7 +1096,7 @@ export class TelerikReportViewer extends React.Component {
|
|
|
1023
1096
|
}
|
|
1024
1097
|
|
|
1025
1098
|
/**
|
|
1026
|
-
* Sets the shortcut keys used when the report viewer is in accessible mode.
|
|
1099
|
+
* Sets the shortcut keys used when the report viewer is in accessible mode. Set the new key map after the report rendering is complete, because the accessibility routines require the report viewer template to be loaded.
|
|
1027
1100
|
* @function
|
|
1028
1101
|
* @param {Object} keyMap - The key map object with keyboard shortcuts.
|
|
1029
1102
|
* @returns {TelerikReportViewer} The current ReportViewer object.
|
|
@@ -1107,14 +1180,14 @@ export class TelerikReportViewer extends React.Component {
|
|
|
1107
1180
|
/**
|
|
1108
1181
|
* Sets the page mode of the viewer.
|
|
1109
1182
|
* @function
|
|
1110
|
-
* @param {string}
|
|
1111
|
-
* @returns {
|
|
1183
|
+
* @param {string} pageMode - The page mode to set ("SINGLE_PAGE" or "CONTINUOUS_SCROLL").
|
|
1184
|
+
* @returns {TelerikReportViewer} The current ReportViewer object.
|
|
1112
1185
|
* @example
|
|
1113
1186
|
* // Set page mode to single page
|
|
1114
1187
|
* reportViewerRef.current.setPageMode("SINGLE_PAGE");
|
|
1115
1188
|
*/
|
|
1116
|
-
setPageMode(
|
|
1117
|
-
return this.viewerObject.pageMode(
|
|
1189
|
+
setPageMode(pageMode) {
|
|
1190
|
+
return this.viewerObject.pageMode(pageMode);
|
|
1118
1191
|
}
|
|
1119
1192
|
|
|
1120
1193
|
/**
|
|
@@ -1167,7 +1240,7 @@ export default TelerikReportViewer;
|
|
|
1167
1240
|
* - checked(): Returns a boolean indicating if the command is in a checked state (for toggle commands).
|
|
1168
1241
|
*
|
|
1169
1242
|
* @typedef {Object} ReportViewerCommand
|
|
1170
|
-
* @property {Function} exec - Executes the command. Some commands accept parameters (see
|
|
1243
|
+
* @property {Function} exec - Executes the command. Some commands accept parameters (see each command's exec example).
|
|
1171
1244
|
* @property {Function} enabled - Returns whether the command is currently enabled.
|
|
1172
1245
|
* @property {Function} checked - Returns whether the command is in a checked state (for toggle commands).
|
|
1173
1246
|
*/
|
|
@@ -1176,357 +1249,297 @@ export default TelerikReportViewer;
|
|
|
1176
1249
|
* Collection of all available commands for the report viewer. Each property is a command name mapped to a {@link ReportViewerCommand} instance.
|
|
1177
1250
|
*
|
|
1178
1251
|
* @typedef {Object} ReportViewerCommands
|
|
1179
|
-
|
|
1180
1252
|
* @property {ReportViewerCommand} historyBack - Goes back to the previously rendered report from history.
|
|
1181
1253
|
* @example <propertyName>historyBack</propertyName>
|
|
1182
|
-
* //
|
|
1183
|
-
*
|
|
1184
|
-
*
|
|
1185
|
-
* <>
|
|
1186
|
-
* <TelerikReportViewer />
|
|
1187
|
-
* <button onClick={() => viewer.commands.historyBack.exec()}>Back</button>
|
|
1188
|
-
* </>
|
|
1189
|
-
* );
|
|
1254
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1255
|
+
* // Navigate back to the previous report in history
|
|
1256
|
+
* reportViewerRef.current.commands.historyBack.exec();
|
|
1190
1257
|
* @example <propertyName>historyBack</propertyName>
|
|
1258
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1191
1259
|
* // Check if the command is enabled
|
|
1192
|
-
* const isEnabled =
|
|
1260
|
+
* const isEnabled = reportViewerRef.current.commands.historyBack.enabled();
|
|
1193
1261
|
* @example <propertyName>historyBack</propertyName>
|
|
1262
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1194
1263
|
* // Check if the command is checked
|
|
1195
|
-
* const isChecked =
|
|
1264
|
+
* const isChecked = reportViewerRef.current.commands.historyBack.checked();
|
|
1265
|
+
*
|
|
1196
1266
|
* @property {ReportViewerCommand} historyForward - Goes forward to the next rendered report from history.
|
|
1197
1267
|
* @example <propertyName>historyForward</propertyName>
|
|
1198
|
-
* //
|
|
1199
|
-
*
|
|
1200
|
-
*
|
|
1201
|
-
* <>
|
|
1202
|
-
* <TelerikReportViewer />
|
|
1203
|
-
* <button onClick={() => viewer.commands.historyForward.exec()}>Forward</button>
|
|
1204
|
-
* </>
|
|
1205
|
-
* );
|
|
1268
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1269
|
+
* // Navigate forward to the next report in history
|
|
1270
|
+
* reportViewerRef.current.commands.historyForward.exec();
|
|
1206
1271
|
* @example <propertyName>historyForward</propertyName>
|
|
1272
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1207
1273
|
* // Check if the command is enabled
|
|
1208
|
-
* const isEnabled =
|
|
1274
|
+
* const isEnabled = reportViewerRef.current.commands.historyForward.enabled();
|
|
1209
1275
|
* @example <propertyName>historyForward</propertyName>
|
|
1276
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1210
1277
|
* // Check if the command is checked
|
|
1211
|
-
* const isChecked =
|
|
1278
|
+
* const isChecked = reportViewerRef.current.commands.historyForward.checked();
|
|
1279
|
+
*
|
|
1212
1280
|
* @property {ReportViewerCommand} refresh - Refreshes the report.
|
|
1213
1281
|
* @example <propertyName>refresh</propertyName>
|
|
1214
|
-
* //
|
|
1215
|
-
*
|
|
1216
|
-
*
|
|
1217
|
-
* <>
|
|
1218
|
-
* <TelerikReportViewer />
|
|
1219
|
-
* <button onClick={() => viewer.commands.refresh.exec()}>Refresh</button>
|
|
1220
|
-
* </>
|
|
1221
|
-
* );
|
|
1282
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1283
|
+
* // Refresh the current report
|
|
1284
|
+
* reportViewerRef.current.commands.refresh.exec();
|
|
1222
1285
|
* @example <propertyName>refresh</propertyName>
|
|
1286
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1223
1287
|
* // Check if the command is enabled
|
|
1224
|
-
* const isEnabled =
|
|
1288
|
+
* const isEnabled = reportViewerRef.current.commands.refresh.enabled();
|
|
1225
1289
|
* @example <propertyName>refresh</propertyName>
|
|
1290
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1226
1291
|
* // Check if the command is checked
|
|
1227
|
-
* const isChecked =
|
|
1292
|
+
* const isChecked = reportViewerRef.current.commands.refresh.checked();
|
|
1293
|
+
*
|
|
1228
1294
|
* @property {ReportViewerCommand} goToFirstPage - Goes to the first page of the report.
|
|
1229
1295
|
* @example <propertyName>goToFirstPage</propertyName>
|
|
1230
|
-
* //
|
|
1231
|
-
*
|
|
1232
|
-
*
|
|
1233
|
-
* <>
|
|
1234
|
-
* <TelerikReportViewer />
|
|
1235
|
-
* <button onClick={() => viewer.commands.goToFirstPage.exec()}>First Page</button>
|
|
1236
|
-
* </>
|
|
1237
|
-
* );
|
|
1296
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1297
|
+
* // Navigate to the first page
|
|
1298
|
+
* reportViewerRef.current.commands.goToFirstPage.exec();
|
|
1238
1299
|
* @example <propertyName>goToFirstPage</propertyName>
|
|
1300
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1239
1301
|
* // Check if the command is enabled
|
|
1240
|
-
* const isEnabled =
|
|
1302
|
+
* const isEnabled = reportViewerRef.current.commands.goToFirstPage.enabled();
|
|
1241
1303
|
* @example <propertyName>goToFirstPage</propertyName>
|
|
1304
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1242
1305
|
* // Check if the command is checked
|
|
1243
|
-
* const isChecked =
|
|
1306
|
+
* const isChecked = reportViewerRef.current.commands.goToFirstPage.checked();
|
|
1307
|
+
*
|
|
1244
1308
|
* @property {ReportViewerCommand} goToPrevPage - Goes to the previous page of the report.
|
|
1245
1309
|
* @example <propertyName>goToPrevPage</propertyName>
|
|
1246
|
-
* //
|
|
1247
|
-
*
|
|
1248
|
-
*
|
|
1249
|
-
* <>
|
|
1250
|
-
* <TelerikReportViewer />
|
|
1251
|
-
* <button onClick={() => viewer.commands.goToPrevPage.exec()}>Previous</button>
|
|
1252
|
-
* </>
|
|
1253
|
-
* );
|
|
1310
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1311
|
+
* // Navigate to the previous page
|
|
1312
|
+
* reportViewerRef.current.commands.goToPrevPage.exec();
|
|
1254
1313
|
* @example <propertyName>goToPrevPage</propertyName>
|
|
1314
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1255
1315
|
* // Check if the command is enabled
|
|
1256
|
-
* const isEnabled =
|
|
1316
|
+
* const isEnabled = reportViewerRef.current.commands.goToPrevPage.enabled();
|
|
1257
1317
|
* @example <propertyName>goToPrevPage</propertyName>
|
|
1318
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1258
1319
|
* // Check if the command is checked
|
|
1259
|
-
* const isChecked =
|
|
1260
|
-
*
|
|
1320
|
+
* const isChecked = reportViewerRef.current.commands.goToPrevPage.checked();
|
|
1321
|
+
*
|
|
1322
|
+
* @property {ReportViewerCommand} goToPage - Goes to a specific page of the report. Pass the page number to exec().
|
|
1261
1323
|
* @example <propertyName>goToPage</propertyName>
|
|
1262
|
-
* //
|
|
1263
|
-
*
|
|
1264
|
-
*
|
|
1265
|
-
* <>
|
|
1266
|
-
* <TelerikReportViewer />
|
|
1267
|
-
* <button onClick={() => viewer.commands.goToPage.exec(5)}>Go to Page 5</button>
|
|
1268
|
-
* </>
|
|
1269
|
-
* );
|
|
1324
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1325
|
+
* // Navigate to page 5
|
|
1326
|
+
* reportViewerRef.current.commands.goToPage.exec(5);
|
|
1270
1327
|
* @example <propertyName>goToPage</propertyName>
|
|
1328
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1271
1329
|
* // Check if the command is enabled
|
|
1272
|
-
* const isEnabled =
|
|
1330
|
+
* const isEnabled = reportViewerRef.current.commands.goToPage.enabled();
|
|
1273
1331
|
* @example <propertyName>goToPage</propertyName>
|
|
1332
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1274
1333
|
* // Check if the command is checked
|
|
1275
|
-
* const isChecked =
|
|
1334
|
+
* const isChecked = reportViewerRef.current.commands.goToPage.checked();
|
|
1335
|
+
*
|
|
1276
1336
|
* @property {ReportViewerCommand} goToNextPage - Goes to the next page of the report.
|
|
1277
1337
|
* @example <propertyName>goToNextPage</propertyName>
|
|
1278
|
-
* //
|
|
1279
|
-
*
|
|
1280
|
-
*
|
|
1281
|
-
* <>
|
|
1282
|
-
* <TelerikReportViewer />
|
|
1283
|
-
* <button onClick={() => viewer.commands.goToNextPage.exec()}>Next</button>
|
|
1284
|
-
* </>
|
|
1285
|
-
* );
|
|
1338
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1339
|
+
* // Navigate to the next page
|
|
1340
|
+
* reportViewerRef.current.commands.goToNextPage.exec();
|
|
1286
1341
|
* @example <propertyName>goToNextPage</propertyName>
|
|
1342
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1287
1343
|
* // Check if the command is enabled
|
|
1288
|
-
* const isEnabled =
|
|
1344
|
+
* const isEnabled = reportViewerRef.current.commands.goToNextPage.enabled();
|
|
1289
1345
|
* @example <propertyName>goToNextPage</propertyName>
|
|
1346
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1290
1347
|
* // Check if the command is checked
|
|
1291
|
-
* const isChecked =
|
|
1348
|
+
* const isChecked = reportViewerRef.current.commands.goToNextPage.checked();
|
|
1349
|
+
*
|
|
1292
1350
|
* @property {ReportViewerCommand} goToLastPage - Goes to the last page of the report.
|
|
1293
1351
|
* @example <propertyName>goToLastPage</propertyName>
|
|
1294
|
-
* //
|
|
1295
|
-
*
|
|
1296
|
-
*
|
|
1297
|
-
* <>
|
|
1298
|
-
* <TelerikReportViewer />
|
|
1299
|
-
* <button onClick={() => viewer.commands.goToLastPage.exec()}>Last Page</button>
|
|
1300
|
-
* </>
|
|
1301
|
-
* );
|
|
1352
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1353
|
+
* // Navigate to the last page
|
|
1354
|
+
* reportViewerRef.current.commands.goToLastPage.exec();
|
|
1302
1355
|
* @example <propertyName>goToLastPage</propertyName>
|
|
1356
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1303
1357
|
* // Check if the command is enabled
|
|
1304
|
-
* const isEnabled =
|
|
1358
|
+
* const isEnabled = reportViewerRef.current.commands.goToLastPage.enabled();
|
|
1305
1359
|
* @example <propertyName>goToLastPage</propertyName>
|
|
1360
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1306
1361
|
* // Check if the command is checked
|
|
1307
|
-
* const isChecked =
|
|
1362
|
+
* const isChecked = reportViewerRef.current.commands.goToLastPage.checked();
|
|
1363
|
+
*
|
|
1308
1364
|
* @property {ReportViewerCommand} togglePrintPreview - Toggles between Print Preview and Interactive view modes.
|
|
1309
1365
|
* @example <propertyName>togglePrintPreview</propertyName>
|
|
1310
|
-
* //
|
|
1311
|
-
*
|
|
1312
|
-
*
|
|
1313
|
-
* <>
|
|
1314
|
-
* <TelerikReportViewer />
|
|
1315
|
-
* <button onClick={() => viewer.commands.togglePrintPreview.exec()}>Toggle Print Preview</button>
|
|
1316
|
-
* </>
|
|
1317
|
-
* );
|
|
1366
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1367
|
+
* // Toggle between Print Preview and Interactive modes
|
|
1368
|
+
* reportViewerRef.current.commands.togglePrintPreview.exec();
|
|
1318
1369
|
* @example <propertyName>togglePrintPreview</propertyName>
|
|
1370
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1319
1371
|
* // Check if the command is enabled
|
|
1320
|
-
* const isEnabled =
|
|
1372
|
+
* const isEnabled = reportViewerRef.current.commands.togglePrintPreview.enabled();
|
|
1321
1373
|
* @example <propertyName>togglePrintPreview</propertyName>
|
|
1322
|
-
* //
|
|
1323
|
-
*
|
|
1324
|
-
*
|
|
1374
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1375
|
+
* // Check if the command is checked (true when in Print Preview mode)
|
|
1376
|
+
* const isChecked = reportViewerRef.current.commands.togglePrintPreview.checked();
|
|
1377
|
+
*
|
|
1378
|
+
* @property {ReportViewerCommand} export - Exports the report. Pass the rendering extension name to exec() (e.g., "PDF", "XLSX", "CSV", "DOCX").
|
|
1379
|
+
* @example <propertyName>export</propertyName>
|
|
1380
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1381
|
+
* // Export the report as PDF
|
|
1382
|
+
* reportViewerRef.current.commands.export.exec("PDF");
|
|
1325
1383
|
* @example <propertyName>export</propertyName>
|
|
1326
|
-
* //
|
|
1327
|
-
* let viewer;
|
|
1328
|
-
* ReactDOM.render(
|
|
1329
|
-
* <>
|
|
1330
|
-
* <TelerikReportViewer />
|
|
1331
|
-
* <button onClick={() => viewer.commands.export.exec('PDF')}>Export PDF</button>
|
|
1332
|
-
* </>
|
|
1333
|
-
* );
|
|
1334
|
-
* @example <propertyName>export</propertyName>
|
|
1384
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1335
1385
|
* // Check if the command is enabled
|
|
1336
|
-
* const isEnabled =
|
|
1386
|
+
* const isEnabled = reportViewerRef.current.commands.export.enabled();
|
|
1337
1387
|
* @example <propertyName>export</propertyName>
|
|
1388
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1338
1389
|
* // Check if the command is checked
|
|
1339
|
-
* const isChecked =
|
|
1390
|
+
* const isChecked = reportViewerRef.current.commands.export.checked();
|
|
1391
|
+
*
|
|
1340
1392
|
* @property {ReportViewerCommand} print - Triggers the report printing.
|
|
1341
1393
|
* @example <propertyName>print</propertyName>
|
|
1342
|
-
* //
|
|
1343
|
-
*
|
|
1344
|
-
*
|
|
1345
|
-
* <>
|
|
1346
|
-
* <TelerikReportViewer />
|
|
1347
|
-
* <button onClick={() => viewer.commands.print.exec()}>Print</button>
|
|
1348
|
-
* </>
|
|
1349
|
-
* );
|
|
1394
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1395
|
+
* // Print the current report
|
|
1396
|
+
* reportViewerRef.current.commands.print.exec();
|
|
1350
1397
|
* @example <propertyName>print</propertyName>
|
|
1398
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1351
1399
|
* // Check if the command is enabled
|
|
1352
|
-
* const isEnabled =
|
|
1400
|
+
* const isEnabled = reportViewerRef.current.commands.print.enabled();
|
|
1353
1401
|
* @example <propertyName>print</propertyName>
|
|
1402
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1354
1403
|
* // Check if the command is checked
|
|
1355
|
-
* const isChecked =
|
|
1404
|
+
* const isChecked = reportViewerRef.current.commands.print.checked();
|
|
1405
|
+
*
|
|
1356
1406
|
* @property {ReportViewerCommand} toggleDocumentMap - Shows or hides the document map.
|
|
1357
1407
|
* @example <propertyName>toggleDocumentMap</propertyName>
|
|
1358
|
-
* //
|
|
1359
|
-
*
|
|
1360
|
-
*
|
|
1361
|
-
* <>
|
|
1362
|
-
* <TelerikReportViewer />
|
|
1363
|
-
* <button onClick={() => viewer.commands.toggleDocumentMap.exec()}>Toggle Document Map</button>
|
|
1364
|
-
* </>
|
|
1365
|
-
* );
|
|
1408
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1409
|
+
* // Toggle the document map visibility
|
|
1410
|
+
* reportViewerRef.current.commands.toggleDocumentMap.exec();
|
|
1366
1411
|
* @example <propertyName>toggleDocumentMap</propertyName>
|
|
1412
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1367
1413
|
* // Check if the command is enabled
|
|
1368
|
-
* const isEnabled =
|
|
1414
|
+
* const isEnabled = reportViewerRef.current.commands.toggleDocumentMap.enabled();
|
|
1369
1415
|
* @example <propertyName>toggleDocumentMap</propertyName>
|
|
1370
|
-
* //
|
|
1371
|
-
*
|
|
1416
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1417
|
+
* // Check if the command is checked (true when document map is visible)
|
|
1418
|
+
* const isChecked = reportViewerRef.current.commands.toggleDocumentMap.checked();
|
|
1419
|
+
*
|
|
1372
1420
|
* @property {ReportViewerCommand} toggleParametersArea - Shows or hides the parameters area.
|
|
1373
1421
|
* @example <propertyName>toggleParametersArea</propertyName>
|
|
1374
|
-
* //
|
|
1375
|
-
*
|
|
1376
|
-
*
|
|
1377
|
-
* <>
|
|
1378
|
-
* <TelerikReportViewer />
|
|
1379
|
-
* <button onClick={() => viewer.commands.toggleParametersArea.exec()}>Toggle Parameters</button>
|
|
1380
|
-
* </>
|
|
1381
|
-
* );
|
|
1422
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1423
|
+
* // Toggle the parameters area visibility
|
|
1424
|
+
* reportViewerRef.current.commands.toggleParametersArea.exec();
|
|
1382
1425
|
* @example <propertyName>toggleParametersArea</propertyName>
|
|
1426
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1383
1427
|
* // Check if the command is enabled
|
|
1384
|
-
* const isEnabled =
|
|
1428
|
+
* const isEnabled = reportViewerRef.current.commands.toggleParametersArea.enabled();
|
|
1385
1429
|
* @example <propertyName>toggleParametersArea</propertyName>
|
|
1386
|
-
* //
|
|
1387
|
-
*
|
|
1388
|
-
*
|
|
1430
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1431
|
+
* // Check if the command is checked (true when parameters area is visible)
|
|
1432
|
+
* const isChecked = reportViewerRef.current.commands.toggleParametersArea.checked();
|
|
1433
|
+
*
|
|
1434
|
+
* @property {ReportViewerCommand} zoomIn - Zooms in on the report.
|
|
1389
1435
|
* @example <propertyName>zoomIn</propertyName>
|
|
1390
|
-
* //
|
|
1391
|
-
*
|
|
1392
|
-
*
|
|
1393
|
-
* <>
|
|
1394
|
-
* <TelerikReportViewer />
|
|
1395
|
-
* <button onClick={() => viewer.commands.zoomIn.exec()}>Zoom In</button>
|
|
1396
|
-
* </>
|
|
1397
|
-
* );
|
|
1436
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1437
|
+
* // Zoom in on the report
|
|
1438
|
+
* reportViewerRef.current.commands.zoomIn.exec();
|
|
1398
1439
|
* @example <propertyName>zoomIn</propertyName>
|
|
1440
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1399
1441
|
* // Check if the command is enabled
|
|
1400
|
-
* const isEnabled =
|
|
1442
|
+
* const isEnabled = reportViewerRef.current.commands.zoomIn.enabled();
|
|
1401
1443
|
* @example <propertyName>zoomIn</propertyName>
|
|
1444
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1402
1445
|
* // Check if the command is checked
|
|
1403
|
-
* const isChecked =
|
|
1404
|
-
*
|
|
1446
|
+
* const isChecked = reportViewerRef.current.commands.zoomIn.checked();
|
|
1447
|
+
*
|
|
1448
|
+
* @property {ReportViewerCommand} zoomOut - Zooms out of the report.
|
|
1405
1449
|
* @example <propertyName>zoomOut</propertyName>
|
|
1406
|
-
* //
|
|
1407
|
-
*
|
|
1408
|
-
*
|
|
1409
|
-
* <>
|
|
1410
|
-
* <TelerikReportViewer />
|
|
1411
|
-
* <button onClick={() => viewer.commands.zoomOut.exec()}>Zoom Out</button>
|
|
1412
|
-
* </>
|
|
1413
|
-
* );
|
|
1450
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1451
|
+
* // Zoom out of the report
|
|
1452
|
+
* reportViewerRef.current.commands.zoomOut.exec();
|
|
1414
1453
|
* @example <propertyName>zoomOut</propertyName>
|
|
1454
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1415
1455
|
* // Check if the command is enabled
|
|
1416
|
-
* const isEnabled =
|
|
1456
|
+
* const isEnabled = reportViewerRef.current.commands.zoomOut.enabled();
|
|
1417
1457
|
* @example <propertyName>zoomOut</propertyName>
|
|
1458
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1418
1459
|
* // Check if the command is checked
|
|
1419
|
-
* const isChecked =
|
|
1420
|
-
*
|
|
1460
|
+
* const isChecked = reportViewerRef.current.commands.zoomOut.checked();
|
|
1461
|
+
*
|
|
1462
|
+
* @property {ReportViewerCommand} zoom - Zooms to a specified ratio. Pass the zoom ratio to exec() (e.g., 1.5 for 150%).
|
|
1421
1463
|
* @example <propertyName>zoom</propertyName>
|
|
1422
|
-
* //
|
|
1423
|
-
*
|
|
1424
|
-
*
|
|
1425
|
-
* <>
|
|
1426
|
-
* <TelerikReportViewer />
|
|
1427
|
-
* <button onClick={() => viewer.commands.zoom.exec(1.5)}>Zoom 150%</button>
|
|
1428
|
-
* </>
|
|
1429
|
-
* );
|
|
1464
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1465
|
+
* // Zoom to 150%
|
|
1466
|
+
* reportViewerRef.current.commands.zoom.exec(1.5);
|
|
1430
1467
|
* @example <propertyName>zoom</propertyName>
|
|
1468
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1431
1469
|
* // Check if the command is enabled
|
|
1432
|
-
* const isEnabled =
|
|
1470
|
+
* const isEnabled = reportViewerRef.current.commands.zoom.enabled();
|
|
1433
1471
|
* @example <propertyName>zoom</propertyName>
|
|
1472
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1434
1473
|
* // Check if the command is checked
|
|
1435
|
-
* const isChecked =
|
|
1436
|
-
*
|
|
1474
|
+
* const isChecked = reportViewerRef.current.commands.zoom.checked();
|
|
1475
|
+
*
|
|
1476
|
+
* @property {ReportViewerCommand} toggleZoomMode - Cycles the zoom mode of the report between FIT_PAGE_WIDTH, FIT_PAGE, and SPECIFIC.
|
|
1437
1477
|
* @example <propertyName>toggleZoomMode</propertyName>
|
|
1438
|
-
* //
|
|
1439
|
-
*
|
|
1440
|
-
*
|
|
1441
|
-
* <>
|
|
1442
|
-
* <TelerikReportViewer />
|
|
1443
|
-
* <button onClick={() => viewer.commands.toggleZoomMode.exec()}>Toggle Zoom Mode</button>
|
|
1444
|
-
* </>
|
|
1445
|
-
* );
|
|
1478
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1479
|
+
* // Cycle to the next zoom mode
|
|
1480
|
+
* reportViewerRef.current.commands.toggleZoomMode.exec();
|
|
1446
1481
|
* @example <propertyName>toggleZoomMode</propertyName>
|
|
1482
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1447
1483
|
* // Check if the command is enabled
|
|
1448
|
-
* const isEnabled =
|
|
1484
|
+
* const isEnabled = reportViewerRef.current.commands.toggleZoomMode.enabled();
|
|
1449
1485
|
* @example <propertyName>toggleZoomMode</propertyName>
|
|
1486
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1450
1487
|
* // Check if the command is checked
|
|
1451
|
-
* const isChecked =
|
|
1452
|
-
*
|
|
1453
|
-
* @example <propertyName>toggleSideMenu</propertyName>
|
|
1454
|
-
* // Execute the command
|
|
1455
|
-
* let viewer;
|
|
1456
|
-
* ReactDOM.render(
|
|
1457
|
-
* <>
|
|
1458
|
-
* <TelerikReportViewer />
|
|
1459
|
-
* <button onClick={() => viewer.commands.toggleSideMenu.exec()}>Toggle Side Menu</button>
|
|
1460
|
-
* </>
|
|
1461
|
-
* );
|
|
1462
|
-
* @example <propertyName>toggleSideMenu</propertyName>
|
|
1463
|
-
* // Check if the command is enabled
|
|
1464
|
-
* const isEnabled = viewer.commands.toggleSideMenu.enabled();
|
|
1465
|
-
* @example <propertyName>toggleSideMenu</propertyName>
|
|
1466
|
-
* // Check if the command is checked
|
|
1467
|
-
* const isChecked = viewer.commands.toggleSideMenu.checked();
|
|
1488
|
+
* const isChecked = reportViewerRef.current.commands.toggleZoomMode.checked();
|
|
1489
|
+
*
|
|
1468
1490
|
* @property {ReportViewerCommand} toggleSearchDialog - Shows or hides the search dialog.
|
|
1469
1491
|
* @example <propertyName>toggleSearchDialog</propertyName>
|
|
1470
|
-
* //
|
|
1471
|
-
*
|
|
1472
|
-
*
|
|
1473
|
-
* <>
|
|
1474
|
-
* <TelerikReportViewer />
|
|
1475
|
-
* <button onClick={() => viewer.commands.toggleSearchDialog.exec()}>Toggle Search</button>
|
|
1476
|
-
* </>
|
|
1477
|
-
* );
|
|
1492
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1493
|
+
* // Toggle the search dialog visibility
|
|
1494
|
+
* reportViewerRef.current.commands.toggleSearchDialog.exec();
|
|
1478
1495
|
* @example <propertyName>toggleSearchDialog</propertyName>
|
|
1496
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1479
1497
|
* // Check if the command is enabled
|
|
1480
|
-
* const isEnabled =
|
|
1498
|
+
* const isEnabled = reportViewerRef.current.commands.toggleSearchDialog.enabled();
|
|
1481
1499
|
* @example <propertyName>toggleSearchDialog</propertyName>
|
|
1482
|
-
* //
|
|
1483
|
-
*
|
|
1500
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1501
|
+
* // Check if the command is checked (true when search dialog is visible)
|
|
1502
|
+
* const isChecked = reportViewerRef.current.commands.toggleSearchDialog.checked();
|
|
1503
|
+
*
|
|
1484
1504
|
* @property {ReportViewerCommand} stopRendering - Stops the rendering of the current report.
|
|
1485
1505
|
* @example <propertyName>stopRendering</propertyName>
|
|
1486
|
-
* //
|
|
1487
|
-
*
|
|
1488
|
-
*
|
|
1489
|
-
* <>
|
|
1490
|
-
* <TelerikReportViewer />
|
|
1491
|
-
* <button onClick={() => viewer.commands.stopRendering.exec()}>Stop Rendering</button>
|
|
1492
|
-
* </>
|
|
1493
|
-
* );
|
|
1506
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1507
|
+
* // Stop the current report rendering
|
|
1508
|
+
* reportViewerRef.current.commands.stopRendering.exec();
|
|
1494
1509
|
* @example <propertyName>stopRendering</propertyName>
|
|
1510
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1495
1511
|
* // Check if the command is enabled
|
|
1496
|
-
* const isEnabled =
|
|
1512
|
+
* const isEnabled = reportViewerRef.current.commands.stopRendering.enabled();
|
|
1497
1513
|
* @example <propertyName>stopRendering</propertyName>
|
|
1514
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1498
1515
|
* // Check if the command is checked
|
|
1499
|
-
* const isChecked =
|
|
1516
|
+
* const isChecked = reportViewerRef.current.commands.stopRendering.checked();
|
|
1517
|
+
*
|
|
1500
1518
|
* @property {ReportViewerCommand} toggleSendEmailDialog - Shows or hides the send email dialog.
|
|
1501
1519
|
* @example <propertyName>toggleSendEmailDialog</propertyName>
|
|
1502
|
-
* //
|
|
1503
|
-
*
|
|
1504
|
-
*
|
|
1505
|
-
* <>
|
|
1506
|
-
* <TelerikReportViewer />
|
|
1507
|
-
* <button onClick={() => viewer.commands.toggleSendEmailDialog.exec()}>Toggle Send Email</button>
|
|
1508
|
-
* </>
|
|
1509
|
-
* );
|
|
1520
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1521
|
+
* // Toggle the send email dialog visibility
|
|
1522
|
+
* reportViewerRef.current.commands.toggleSendEmailDialog.exec();
|
|
1510
1523
|
* @example <propertyName>toggleSendEmailDialog</propertyName>
|
|
1524
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1511
1525
|
* // Check if the command is enabled
|
|
1512
|
-
* const isEnabled =
|
|
1526
|
+
* const isEnabled = reportViewerRef.current.commands.toggleSendEmailDialog.enabled();
|
|
1513
1527
|
* @example <propertyName>toggleSendEmailDialog</propertyName>
|
|
1514
|
-
* //
|
|
1515
|
-
*
|
|
1528
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1529
|
+
* // Check if the command is checked (true when send email dialog is visible)
|
|
1530
|
+
* const isChecked = reportViewerRef.current.commands.toggleSendEmailDialog.checked();
|
|
1531
|
+
*
|
|
1516
1532
|
* @property {ReportViewerCommand} toggleAiPromptDialog - Shows or hides the AI prompt dialog.
|
|
1517
1533
|
* @example <propertyName>toggleAiPromptDialog</propertyName>
|
|
1518
|
-
* //
|
|
1519
|
-
*
|
|
1520
|
-
*
|
|
1521
|
-
* <>
|
|
1522
|
-
* <TelerikReportViewer />
|
|
1523
|
-
* <button onClick={() => viewer.commands.toggleAiPromptDialog.exec()}>Toggle AI Prompt</button>
|
|
1524
|
-
* </>
|
|
1525
|
-
* );
|
|
1534
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1535
|
+
* // Toggle the AI prompt dialog visibility
|
|
1536
|
+
* reportViewerRef.current.commands.toggleAiPromptDialog.exec();
|
|
1526
1537
|
* @example <propertyName>toggleAiPromptDialog</propertyName>
|
|
1538
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1527
1539
|
* // Check if the command is enabled
|
|
1528
|
-
* const isEnabled =
|
|
1540
|
+
* const isEnabled = reportViewerRef.current.commands.toggleAiPromptDialog.enabled();
|
|
1529
1541
|
* @example <propertyName>toggleAiPromptDialog</propertyName>
|
|
1530
|
-
* //
|
|
1531
|
-
*
|
|
1542
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1543
|
+
* // Check if the command is checked (true when AI prompt dialog is visible)
|
|
1544
|
+
* const isChecked = reportViewerRef.current.commands.toggleAiPromptDialog.checked();
|
|
1532
1545
|
*/
|