@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
|
@@ -23,8 +23,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
23
23
|
* - Default: "LIST_VIEW"
|
|
24
24
|
*
|
|
25
25
|
* @example
|
|
26
|
-
* //
|
|
27
|
-
*
|
|
26
|
+
* // Specify editor types for report parameters
|
|
28
27
|
* <TelerikReportViewer
|
|
29
28
|
* serviceUrl="api/reports/"
|
|
30
29
|
* reportSource={{ report: "Dashboard.trdp" }}
|
|
@@ -55,19 +54,19 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
55
54
|
|
|
56
55
|
/**
|
|
57
56
|
* Configuration for connecting to a Telerik Report Server instance.
|
|
58
|
-
*
|
|
57
|
+
*
|
|
59
58
|
* The authentication method depends on the Report Server version:
|
|
60
59
|
* - Report Server for .NET: Supports Token authentication (getPersonalAccessToken) or username/password authentication. The token can be from any user, including the Guest user.
|
|
61
60
|
* - Report Server for .NET Framework 4.6.2: Supports username/password authentication or Guest account (url only, if Guest is enabled on the server).
|
|
62
|
-
*
|
|
61
|
+
*
|
|
63
62
|
* @typedef {Object} ReportServer
|
|
64
|
-
* @property {string} url - The URL
|
|
65
|
-
* @property {function} [getPersonalAccessToken] - A callback
|
|
66
|
-
* @property {string} [username] - A registered username
|
|
67
|
-
* @property {string} [password] - The password for the provided username.
|
|
63
|
+
* @property {string} url - The URL of the Telerik Report Server instance.
|
|
64
|
+
* @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.
|
|
65
|
+
* @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.
|
|
66
|
+
* @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.
|
|
68
67
|
*
|
|
69
68
|
* @example <propertyName>getPersonalAccessToken</propertyName>
|
|
70
|
-
* //
|
|
69
|
+
* // Report Server for .NET - Token authentication (recommended)
|
|
71
70
|
* <TelerikReportViewer
|
|
72
71
|
* reportServer={{
|
|
73
72
|
* url: "https://my-report-server-net/",
|
|
@@ -79,7 +78,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
79
78
|
* />
|
|
80
79
|
*
|
|
81
80
|
* @example <propertyName>getPersonalAccessToken</propertyName>
|
|
82
|
-
* //
|
|
81
|
+
* // Report Server for .NET - Token authentication with a secure endpoint
|
|
83
82
|
* <TelerikReportViewer
|
|
84
83
|
* reportServer={{
|
|
85
84
|
* url: "https://my-report-server-net/",
|
|
@@ -92,7 +91,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
92
91
|
* />
|
|
93
92
|
*
|
|
94
93
|
* @example <propertyName>getPersonalAccessToken</propertyName>
|
|
95
|
-
* //
|
|
94
|
+
* // Report Server for .NET - Token authentication with Guest user token
|
|
96
95
|
* <TelerikReportViewer
|
|
97
96
|
* reportServer={{
|
|
98
97
|
* url: "https://my-report-server-net/",
|
|
@@ -104,7 +103,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
104
103
|
* />
|
|
105
104
|
*
|
|
106
105
|
* @example <propertyName>username</propertyName>
|
|
107
|
-
* //
|
|
106
|
+
* // Report Server for .NET - Username/password authentication
|
|
108
107
|
* <TelerikReportViewer
|
|
109
108
|
* reportServer={{
|
|
110
109
|
* url: "https://my-report-server-net/",
|
|
@@ -115,7 +114,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
115
114
|
* />
|
|
116
115
|
*
|
|
117
116
|
* @example <propertyName>username</propertyName>
|
|
118
|
-
* //
|
|
117
|
+
* // Report Server for .NET Framework - Username/password authentication
|
|
119
118
|
* <TelerikReportViewer
|
|
120
119
|
* reportServer={{
|
|
121
120
|
* url: "https://my-report-server-framework/",
|
|
@@ -126,7 +125,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
126
125
|
* />
|
|
127
126
|
*
|
|
128
127
|
* @example <propertyName>url</propertyName>
|
|
129
|
-
* //
|
|
128
|
+
* // Report Server for .NET Framework - Guest account (requires Guest enabled on server)
|
|
130
129
|
* <TelerikReportViewer
|
|
131
130
|
* reportServer={{
|
|
132
131
|
* url: "https://my-report-server-framework/"
|
|
@@ -135,7 +134,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
135
134
|
* />
|
|
136
135
|
*
|
|
137
136
|
* @example <propertyName>reportServer</propertyName>
|
|
138
|
-
* //
|
|
137
|
+
* // Complete initialization with Report Server for .NET using Token authentication
|
|
139
138
|
* <TelerikReportViewer
|
|
140
139
|
* reportServer={{
|
|
141
140
|
* url: "https://my-report-server-net/",
|
|
@@ -155,19 +154,19 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
155
154
|
/**
|
|
156
155
|
* Configuration object that identifies the report to be displayed and provides initial parameter values.
|
|
157
156
|
* @typedef {Object} ReportSource
|
|
158
|
-
* @property {string} [report] - A string
|
|
159
|
-
* @property {ReportParameters} [parameters] -
|
|
157
|
+
* @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}'.
|
|
158
|
+
* @property {ReportParameters} [parameters] - An object whose keys are report parameter names and values are the corresponding parameter values.
|
|
160
159
|
*
|
|
161
160
|
* @example <propertyName>report</propertyName>
|
|
162
|
-
* //
|
|
161
|
+
* // Minimal report source with only the report file name
|
|
163
162
|
* const reportSource = {
|
|
164
|
-
* report: "MyReport"
|
|
163
|
+
* report: "MyReport.trdp"
|
|
165
164
|
* };
|
|
166
165
|
*
|
|
167
166
|
* @example <propertyName>parameters</propertyName>
|
|
168
|
-
* //
|
|
167
|
+
* // Report source with parameters
|
|
169
168
|
* const reportSource = {
|
|
170
|
-
* report: "SalesReport",
|
|
169
|
+
* report: "SalesReport.trdp",
|
|
171
170
|
* parameters: {
|
|
172
171
|
* StartDate: "2024-01-01",
|
|
173
172
|
* EndDate: "2024-12-31",
|
|
@@ -176,13 +175,13 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
176
175
|
* };
|
|
177
176
|
*
|
|
178
177
|
* @example <propertyName>report</propertyName>
|
|
179
|
-
* //
|
|
178
|
+
* // Report Server format
|
|
180
179
|
* const reportSource = {
|
|
181
180
|
* report: "Finance/MonthlyReport"
|
|
182
181
|
* };
|
|
183
182
|
*
|
|
184
183
|
* @example
|
|
185
|
-
* //
|
|
184
|
+
* // Using ReportSource with the React Report Viewer
|
|
186
185
|
* <TelerikReportViewer
|
|
187
186
|
* serviceUrl="api/reports/"
|
|
188
187
|
* reportSource={{
|
|
@@ -218,8 +217,8 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
218
217
|
* @property {string} [to] - E-mail address used for the MailMessage TO value.
|
|
219
218
|
* @property {string} [cc] - E-mail address used for the MailMessage Carbon Copy value.
|
|
220
219
|
* @property {string} [subject] - A string used for the MailMessage Subject value.
|
|
221
|
-
* @property {string} [body] -
|
|
222
|
-
* @property {string} [format] - The preselected report
|
|
220
|
+
* @property {string} [body] - Text content for the email body.
|
|
221
|
+
* @property {string} [format] - The preselected document format for the report attachment (e.g., 'PDF', 'XLSX').
|
|
223
222
|
*
|
|
224
223
|
* @example
|
|
225
224
|
* // Enable Send Email with default values and PDF as the default format
|
|
@@ -251,63 +250,79 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
251
250
|
|
|
252
251
|
/**
|
|
253
252
|
* Represents the API of a parameter editor instance returned by createEditor.
|
|
253
|
+
*
|
|
254
|
+
* Implementations must provide `beginEdit`, `addAccessibility`, and `setAccessibilityErrorState`.
|
|
255
|
+
* The viewer calls `addAccessibility` / `setAccessibilityErrorState` when `enableAccessibility` is true.
|
|
256
|
+
* Optional members like `clearPendingChange` and `destroy` are lifecycle hooks for editors
|
|
257
|
+
* that manage external widgets or pending async updates.
|
|
254
258
|
* @typedef {Object} ParameterEditorInstance
|
|
255
259
|
* @property {function(Object):void} beginEdit - Creates the editor UI and populates it with the parameter settings.
|
|
256
|
-
* @property {function(Object):void} addAccessibility - Adds accessibility to the parameter editor and populates its string resources.
|
|
257
|
-
* @property {function(Object):void} setAccessibilityErrorState - Sets the error state of the parameter editor's accessibility functionality and its error attributes.
|
|
258
|
-
* @
|
|
259
|
-
* @property {function():void}
|
|
260
|
-
* @property {function():void} [
|
|
260
|
+
* @property {function(Object):void} addAccessibility - Adds accessibility to the parameter editor and populates its string resources. Called by the viewer when `enableAccessibility` is true.
|
|
261
|
+
* @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.
|
|
262
|
+
* @internal
|
|
263
|
+
* @property {function(boolean):void} enable - Enables or disables the parameter editor (e.g., when the "use default value" checkbox is toggled).
|
|
264
|
+
* @property {function():void} [clearPendingChange] - Invoked when parameter changes.
|
|
265
|
+
* @property {function():void} [destroy] - Invoked to destroy the parameter editor.
|
|
261
266
|
*/
|
|
262
267
|
|
|
263
268
|
/**
|
|
264
|
-
* Describes a parameter editor for the Telerik Report Viewer
|
|
269
|
+
* Describes a parameter editor for the Telerik Report Viewer parameters area.
|
|
265
270
|
* @typedef {Object} ParameterEditor
|
|
266
271
|
* @property {function(Object): boolean} match - Determines if the editor is suitable for the parameter.
|
|
267
|
-
* @property {function(HTMLElement, Object): ParameterEditorInstance} createEditor - Creates the editor UI.
|
|
272
|
+
* @property {function(HTMLElement, Object): ParameterEditorInstance} createEditor - Creates the editor UI and returns an editor instance.
|
|
268
273
|
* @example
|
|
269
|
-
* //
|
|
270
|
-
*
|
|
271
|
-
* // Use parameter properties to determine if this editor should be used
|
|
274
|
+
* // Custom match function for single-select parameters
|
|
275
|
+
* function match(parameter) {
|
|
272
276
|
* return Boolean(parameter.availableValues) && !parameter.multivalue;
|
|
273
|
-
* }
|
|
277
|
+
* }
|
|
274
278
|
*
|
|
275
279
|
* @example
|
|
276
|
-
* //
|
|
280
|
+
* // Custom createEditor function using Kendo DateTimePicker
|
|
277
281
|
* function match(parameter) {
|
|
278
282
|
* return parameter.type === "System.DateTime";
|
|
279
283
|
* }
|
|
280
284
|
*
|
|
281
285
|
* function createEditor(placeholder, options) {
|
|
282
|
-
*
|
|
283
|
-
* parameter
|
|
284
|
-
* valueChangedCallback = options.parameterChanged
|
|
285
|
-
*
|
|
286
|
+
* const container = $(placeholder).html('<input type="datetime"/>');
|
|
287
|
+
* let parameter;
|
|
288
|
+
* const valueChangedCallback = options.parameterChanged;
|
|
289
|
+
* let picker;
|
|
290
|
+
*
|
|
286
291
|
* function onChange() {
|
|
287
|
-
*
|
|
292
|
+
* const val = picker.value();
|
|
288
293
|
* valueChangedCallback(parameter, val);
|
|
289
294
|
* }
|
|
295
|
+
*
|
|
290
296
|
* return {
|
|
291
297
|
* beginEdit: function (param) {
|
|
292
298
|
* parameter = param;
|
|
293
|
-
* $(
|
|
299
|
+
* $(container).find("input").kendoDateTimePicker({
|
|
294
300
|
* dataTextField: "name",
|
|
295
301
|
* dataValueField: "value",
|
|
296
302
|
* value: parameter.value,
|
|
297
303
|
* dataSource: parameter.availableValues,
|
|
298
304
|
* change: onChange
|
|
299
305
|
* });
|
|
300
|
-
*
|
|
306
|
+
* picker = $(container).find("input").data("kendoDateTimePicker");
|
|
307
|
+
* },
|
|
308
|
+
*
|
|
309
|
+
* addAccessibility: function (accessibilityOptions) {
|
|
310
|
+
* // Apply ARIA attributes, labels, etc. to the editor input.
|
|
311
|
+
* },
|
|
312
|
+
*
|
|
313
|
+
* setAccessibilityErrorState: function (hasError) {
|
|
314
|
+
* // Update ARIA error attributes on the editor input.
|
|
301
315
|
* }
|
|
302
316
|
* };
|
|
303
317
|
* }
|
|
304
318
|
*
|
|
305
319
|
* @example
|
|
306
|
-
* //
|
|
307
|
-
*
|
|
308
|
-
*
|
|
309
|
-
*
|
|
310
|
-
* }
|
|
320
|
+
* // Registering a custom parameter editor
|
|
321
|
+
* <TelerikReportViewer
|
|
322
|
+
* serviceUrl="api/reports/"
|
|
323
|
+
* reportSource={{ report: "Dashboard.trdp" }}
|
|
324
|
+
* parameterEditors={[{ match, createEditor }]}
|
|
325
|
+
* />
|
|
311
326
|
*
|
|
312
327
|
*/
|
|
313
328
|
|
|
@@ -355,7 +370,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
355
370
|
* reportSource={{ report: "Finance/Dashboard" }}
|
|
356
371
|
* />
|
|
357
372
|
*
|
|
358
|
-
* @property {string} [templateUrl] - Sets the address of the
|
|
373
|
+
* @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.
|
|
359
374
|
* @example <propertyName>templateUrl</propertyName>
|
|
360
375
|
* // Use a custom template
|
|
361
376
|
* <TelerikReportViewer
|
|
@@ -467,45 +482,90 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
467
482
|
* }}
|
|
468
483
|
* />
|
|
469
484
|
*
|
|
470
|
-
* @property {ParameterEditor} [parameterEditors] - Allows the user to define custom editors for the report parameters.
|
|
485
|
+
* @property {ParameterEditor[]} [parameterEditors] - Allows the user to define custom editors for the report parameters.
|
|
471
486
|
* @example <propertyName>parameterEditors</propertyName>
|
|
472
487
|
* // Register custom parameter editors
|
|
473
488
|
* const customEditors = [{
|
|
474
489
|
* match: function(param) { return param.name === "MyParam"; },
|
|
475
|
-
* createEditor: function(placeholder, options) {
|
|
490
|
+
* createEditor: function(placeholder, options) {
|
|
491
|
+
* return {
|
|
492
|
+
* beginEdit: function(param) {
|
|
493
|
+
* // Create and initialize the editor UI inside placeholder.
|
|
494
|
+
* },
|
|
495
|
+
* addAccessibility: function(accessibilityOptions) {
|
|
496
|
+
* // Apply ARIA attributes and accessibility strings.
|
|
497
|
+
* },
|
|
498
|
+
* setAccessibilityErrorState: function(hasError) {
|
|
499
|
+
* // Update accessibility error state on the editor.
|
|
500
|
+
* }
|
|
501
|
+
* };
|
|
502
|
+
* }
|
|
476
503
|
* }];
|
|
477
|
-
*
|
|
504
|
+
*
|
|
505
|
+
* <TelerikReportViewer
|
|
506
|
+
* serviceUrl="api/reports/"
|
|
507
|
+
* reportSource={{ report: "Dashboard.trdp" }}
|
|
508
|
+
* parameterEditors={customEditors}
|
|
509
|
+
* />
|
|
478
510
|
*
|
|
479
511
|
* @property {string} [authenticationToken] - If provided, a Bearer token will be set in the Authorization header for every request to the REST service.
|
|
480
512
|
* @example <propertyName>authenticationToken</propertyName>
|
|
481
|
-
* // Set authentication token
|
|
482
|
-
*
|
|
483
|
-
*
|
|
513
|
+
* // Set a Bearer authentication token for REST service requests
|
|
514
|
+
* <TelerikReportViewer
|
|
515
|
+
* serviceUrl="api/reports/"
|
|
516
|
+
* reportSource={{ report: "Dashboard.trdp" }}
|
|
517
|
+
* authenticationToken="YOUR_AUTH_TOKEN"
|
|
518
|
+
* />
|
|
484
519
|
*
|
|
485
520
|
* @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".
|
|
486
521
|
* @example <propertyName>printMode</propertyName>
|
|
487
|
-
* // Force PDF file for printing
|
|
488
|
-
*
|
|
522
|
+
* // Force PDF file download for printing
|
|
523
|
+
* <TelerikReportViewer
|
|
524
|
+
* serviceUrl="api/reports/"
|
|
525
|
+
* reportSource={{ report: "Dashboard.trdp" }}
|
|
526
|
+
* printMode="FORCE_PDF_FILE"
|
|
527
|
+
* />
|
|
489
528
|
*
|
|
490
|
-
* @property {string} [selector] - A selector
|
|
529
|
+
* @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.
|
|
491
530
|
* @example <propertyName>selector</propertyName>
|
|
492
|
-
* //
|
|
493
|
-
*
|
|
531
|
+
* // The selector must match the viewer's own container id (same value used in data-target-report-viewer on external buttons)
|
|
532
|
+
* <TelerikReportViewer
|
|
533
|
+
* id="rv1"
|
|
534
|
+
* serviceUrl="api/reports/"
|
|
535
|
+
* reportSource={{ report: "Dashboard.trdp" }}
|
|
536
|
+
* selector="#rv1"
|
|
537
|
+
* disabledButtonClass="btn-disabled"
|
|
538
|
+
* checkedButtonClass="btn-checked"
|
|
539
|
+
* />
|
|
494
540
|
*
|
|
495
|
-
*
|
|
541
|
+
* // External buttons reference the same selector in data-target-report-viewer:
|
|
542
|
+
* // <button data-command="telerik_ReportViewer_goToNextPage" data-target-report-viewer="#rv1">Next</button>
|
|
543
|
+
*
|
|
544
|
+
* @property {string} [disabledButtonClass] - A CSS class added to external command buttons (bound via data-attributes) when the command is in a disabled state.
|
|
496
545
|
* @example <propertyName>disabledButtonClass</propertyName>
|
|
497
|
-
* //
|
|
498
|
-
*
|
|
546
|
+
* // Apply custom styling to disabled command buttons
|
|
547
|
+
* <TelerikReportViewer
|
|
548
|
+
* id="rv1"
|
|
549
|
+
* serviceUrl="api/reports/"
|
|
550
|
+
* reportSource={{ report: "Dashboard.trdp" }}
|
|
551
|
+
* selector="#rv1"
|
|
552
|
+
* disabledButtonClass="btn-disabled"
|
|
553
|
+
* />
|
|
499
554
|
*
|
|
500
|
-
* @property {string} [checkedButtonClass] - A class
|
|
555
|
+
* @property {string} [checkedButtonClass] - A CSS class added to external command buttons (bound via data-attributes) when the command is in a checked state.
|
|
501
556
|
* @example <propertyName>checkedButtonClass</propertyName>
|
|
502
|
-
* //
|
|
503
|
-
*
|
|
557
|
+
* // Apply custom styling to checked/active command buttons
|
|
558
|
+
* <TelerikReportViewer
|
|
559
|
+
* id="rv1"
|
|
560
|
+
* serviceUrl="api/reports/"
|
|
561
|
+
* reportSource={{ report: "Dashboard.trdp" }}
|
|
562
|
+
* selector="#rv1"
|
|
563
|
+
* checkedButtonClass="btn-active"
|
|
564
|
+
* />
|
|
504
565
|
*
|
|
505
566
|
* @property {boolean} [enableAccessibility] - Determines whether the viewer should provide support for accessibility features. Default value is false.
|
|
506
567
|
* @example <propertyName>enableAccessibility</propertyName>
|
|
507
568
|
* // Enable accessibility features
|
|
508
|
-
* // Use with component: enableAccessibility={true}
|
|
509
569
|
* <TelerikReportViewer
|
|
510
570
|
* serviceUrl="api/reports/"
|
|
511
571
|
* reportSource={{ report: "Dashboard.trdp" }}
|
|
@@ -566,7 +626,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
566
626
|
* initialPageAreaImageUrl="/images/reportBackground.png"
|
|
567
627
|
* />
|
|
568
628
|
*
|
|
569
|
-
* @property {boolean} [keepClientAlive] - Determines whether the client
|
|
629
|
+
* @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.
|
|
570
630
|
* @example <propertyName>keepClientAlive</propertyName>
|
|
571
631
|
* // Keep client alive
|
|
572
632
|
* <TelerikReportViewer
|
|
@@ -588,6 +648,19 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
588
648
|
* }}
|
|
589
649
|
* />
|
|
590
650
|
*
|
|
651
|
+
* @property {Object} [localizationResources] - An object containing all or a subset of the viewer's localization resources in a chosen language.
|
|
652
|
+
* @example <propertyName>localizationResources</propertyName>
|
|
653
|
+
* // Set localization resources
|
|
654
|
+
* <TelerikReportViewer
|
|
655
|
+
* serviceUrl="api/reports/"
|
|
656
|
+
* reportSource={{ report: "Dashboard.trdp" }}
|
|
657
|
+
* localizationResources={{
|
|
658
|
+
* loadingFormats: "Loading...",
|
|
659
|
+
* loadingReport: "Loading report...",
|
|
660
|
+
* loadingParameters: "Loading parameters...",
|
|
661
|
+
* }}
|
|
662
|
+
* />
|
|
663
|
+
*
|
|
591
664
|
* @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.
|
|
592
665
|
* @example <propertyName>ready</propertyName>
|
|
593
666
|
* // Ready callback
|
|
@@ -649,11 +722,9 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
649
722
|
* serviceUrl="api/reports/"
|
|
650
723
|
* reportSource={{ report: "Dashboard.trdp" }}
|
|
651
724
|
* renderingBegin={(e, args) => {
|
|
652
|
-
* //
|
|
653
|
-
*
|
|
654
|
-
* args.deviceInfo["
|
|
655
|
-
* args.deviceInfo["CurrentUICulture"] = culture;
|
|
656
|
-
* console.log("About to render the report.");
|
|
725
|
+
* // Use deviceInfo to set a specific culture for rendering
|
|
726
|
+
* args.deviceInfo["CurrentCulture"] = "de-DE";
|
|
727
|
+
* args.deviceInfo["CurrentUICulture"] = "de-DE";
|
|
657
728
|
* }}
|
|
658
729
|
* />
|
|
659
730
|
*
|
|
@@ -860,7 +931,9 @@ class TelerikReportViewer extends _react.default.Component {
|
|
|
860
931
|
documentMapVisible: this.props.documentMapVisible,
|
|
861
932
|
documentMapAreaPosition: this.props.documentMapAreaPosition,
|
|
862
933
|
parametersAreaPosition: this.props.parametersAreaPosition,
|
|
863
|
-
keepClientAlive: keepClientAlive
|
|
934
|
+
keepClientAlive: keepClientAlive,
|
|
935
|
+
localizationResources: this.props.localizationResources,
|
|
936
|
+
wrapper: "react"
|
|
864
937
|
});
|
|
865
938
|
this.commands = this.viewerObject.commands;
|
|
866
939
|
}
|
|
@@ -909,7 +982,7 @@ class TelerikReportViewer extends _react.default.Component {
|
|
|
909
982
|
/**
|
|
910
983
|
* Sets the report source - report and parameters. Automatically reloads the report (if any) into the view.
|
|
911
984
|
* @function
|
|
912
|
-
* @param {{report: string, parameters: Object}}
|
|
985
|
+
* @param {{report: string, parameters: Object}} reportSource - The report source object to set. Object with properties: report (string) and parameters (JSON).
|
|
913
986
|
* @returns {TelerikReportViewer} The current ReportViewer object.
|
|
914
987
|
* @example
|
|
915
988
|
* // Set a new report source
|
|
@@ -918,8 +991,8 @@ class TelerikReportViewer extends _react.default.Component {
|
|
|
918
991
|
* parameters: { StartDate: "2024-01-01", EndDate: "2024-12-31" }
|
|
919
992
|
* });
|
|
920
993
|
*/
|
|
921
|
-
setReportSource(
|
|
922
|
-
return this.viewerObject.reportSource(
|
|
994
|
+
setReportSource(reportSource) {
|
|
995
|
+
return this.viewerObject.reportSource(reportSource);
|
|
923
996
|
}
|
|
924
997
|
|
|
925
998
|
/**
|
|
@@ -936,16 +1009,16 @@ class TelerikReportViewer extends _react.default.Component {
|
|
|
936
1009
|
}
|
|
937
1010
|
|
|
938
1011
|
/**
|
|
939
|
-
* Sets the view mode and automatically reloads the current report
|
|
1012
|
+
* Sets the view mode and automatically reloads the current report into the new view.
|
|
940
1013
|
* @function
|
|
941
|
-
* @param {string}
|
|
1014
|
+
* @param {string} viewMode - The view mode to set ("INTERACTIVE" or "PRINT_PREVIEW").
|
|
942
1015
|
* @returns {TelerikReportViewer} The current ReportViewer object.
|
|
943
1016
|
* @example
|
|
944
1017
|
* // Set view mode to print preview
|
|
945
1018
|
* reportViewerRef.current.setViewMode("PRINT_PREVIEW");
|
|
946
1019
|
*/
|
|
947
|
-
setViewMode(
|
|
948
|
-
return this.viewerObject.viewMode(
|
|
1020
|
+
setViewMode(viewMode) {
|
|
1021
|
+
return this.viewerObject.viewMode(viewMode);
|
|
949
1022
|
}
|
|
950
1023
|
|
|
951
1024
|
/**
|
|
@@ -1014,9 +1087,9 @@ class TelerikReportViewer extends _react.default.Component {
|
|
|
1014
1087
|
}
|
|
1015
1088
|
|
|
1016
1089
|
/**
|
|
1017
|
-
* Gets the shortcut keys used when the report viewer is in accessible mode (enableAccessibility=true).
|
|
1090
|
+
* Gets the shortcut keys used when the report viewer is in accessible mode (enableAccessibility={true}).
|
|
1018
1091
|
* @function
|
|
1019
|
-
* @returns {Object} The current accessibility key map.
|
|
1092
|
+
* @returns {Object|undefined} The current accessibility key map, or undefined if accessibility is not enabled.
|
|
1020
1093
|
* @example
|
|
1021
1094
|
* // Get accessibility key map
|
|
1022
1095
|
* const keyMap = reportViewerRef.current.getAccessibilityKeyMap();
|
|
@@ -1029,7 +1102,7 @@ class TelerikReportViewer extends _react.default.Component {
|
|
|
1029
1102
|
}
|
|
1030
1103
|
|
|
1031
1104
|
/**
|
|
1032
|
-
* Sets the shortcut keys used when the report viewer is in accessible mode.
|
|
1105
|
+
* 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.
|
|
1033
1106
|
* @function
|
|
1034
1107
|
* @param {Object} keyMap - The key map object with keyboard shortcuts.
|
|
1035
1108
|
* @returns {TelerikReportViewer} The current ReportViewer object.
|
|
@@ -1113,14 +1186,14 @@ class TelerikReportViewer extends _react.default.Component {
|
|
|
1113
1186
|
/**
|
|
1114
1187
|
* Sets the page mode of the viewer.
|
|
1115
1188
|
* @function
|
|
1116
|
-
* @param {string}
|
|
1117
|
-
* @returns {
|
|
1189
|
+
* @param {string} pageMode - The page mode to set ("SINGLE_PAGE" or "CONTINUOUS_SCROLL").
|
|
1190
|
+
* @returns {TelerikReportViewer} The current ReportViewer object.
|
|
1118
1191
|
* @example
|
|
1119
1192
|
* // Set page mode to single page
|
|
1120
1193
|
* reportViewerRef.current.setPageMode("SINGLE_PAGE");
|
|
1121
1194
|
*/
|
|
1122
|
-
setPageMode(
|
|
1123
|
-
return this.viewerObject.pageMode(
|
|
1195
|
+
setPageMode(pageMode) {
|
|
1196
|
+
return this.viewerObject.pageMode(pageMode);
|
|
1124
1197
|
}
|
|
1125
1198
|
|
|
1126
1199
|
/**
|
|
@@ -1173,7 +1246,7 @@ var _default = exports.default = TelerikReportViewer;
|
|
|
1173
1246
|
* - checked(): Returns a boolean indicating if the command is in a checked state (for toggle commands).
|
|
1174
1247
|
*
|
|
1175
1248
|
* @typedef {Object} ReportViewerCommand
|
|
1176
|
-
* @property {Function} exec - Executes the command. Some commands accept parameters (see
|
|
1249
|
+
* @property {Function} exec - Executes the command. Some commands accept parameters (see each command's exec example).
|
|
1177
1250
|
* @property {Function} enabled - Returns whether the command is currently enabled.
|
|
1178
1251
|
* @property {Function} checked - Returns whether the command is in a checked state (for toggle commands).
|
|
1179
1252
|
*/
|
|
@@ -1181,357 +1254,297 @@ var _default = exports.default = TelerikReportViewer;
|
|
|
1181
1254
|
* Collection of all available commands for the report viewer. Each property is a command name mapped to a {@link ReportViewerCommand} instance.
|
|
1182
1255
|
*
|
|
1183
1256
|
* @typedef {Object} ReportViewerCommands
|
|
1184
|
-
|
|
1185
1257
|
* @property {ReportViewerCommand} historyBack - Goes back to the previously rendered report from history.
|
|
1186
1258
|
* @example <propertyName>historyBack</propertyName>
|
|
1187
|
-
* //
|
|
1188
|
-
*
|
|
1189
|
-
*
|
|
1190
|
-
* <>
|
|
1191
|
-
* <TelerikReportViewer />
|
|
1192
|
-
* <button onClick={() => viewer.commands.historyBack.exec()}>Back</button>
|
|
1193
|
-
* </>
|
|
1194
|
-
* );
|
|
1259
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1260
|
+
* // Navigate back to the previous report in history
|
|
1261
|
+
* reportViewerRef.current.commands.historyBack.exec();
|
|
1195
1262
|
* @example <propertyName>historyBack</propertyName>
|
|
1263
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1196
1264
|
* // Check if the command is enabled
|
|
1197
|
-
* const isEnabled =
|
|
1265
|
+
* const isEnabled = reportViewerRef.current.commands.historyBack.enabled();
|
|
1198
1266
|
* @example <propertyName>historyBack</propertyName>
|
|
1267
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1199
1268
|
* // Check if the command is checked
|
|
1200
|
-
* const isChecked =
|
|
1269
|
+
* const isChecked = reportViewerRef.current.commands.historyBack.checked();
|
|
1270
|
+
*
|
|
1201
1271
|
* @property {ReportViewerCommand} historyForward - Goes forward to the next rendered report from history.
|
|
1202
1272
|
* @example <propertyName>historyForward</propertyName>
|
|
1203
|
-
* //
|
|
1204
|
-
*
|
|
1205
|
-
*
|
|
1206
|
-
* <>
|
|
1207
|
-
* <TelerikReportViewer />
|
|
1208
|
-
* <button onClick={() => viewer.commands.historyForward.exec()}>Forward</button>
|
|
1209
|
-
* </>
|
|
1210
|
-
* );
|
|
1273
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1274
|
+
* // Navigate forward to the next report in history
|
|
1275
|
+
* reportViewerRef.current.commands.historyForward.exec();
|
|
1211
1276
|
* @example <propertyName>historyForward</propertyName>
|
|
1277
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1212
1278
|
* // Check if the command is enabled
|
|
1213
|
-
* const isEnabled =
|
|
1279
|
+
* const isEnabled = reportViewerRef.current.commands.historyForward.enabled();
|
|
1214
1280
|
* @example <propertyName>historyForward</propertyName>
|
|
1281
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1215
1282
|
* // Check if the command is checked
|
|
1216
|
-
* const isChecked =
|
|
1283
|
+
* const isChecked = reportViewerRef.current.commands.historyForward.checked();
|
|
1284
|
+
*
|
|
1217
1285
|
* @property {ReportViewerCommand} refresh - Refreshes the report.
|
|
1218
1286
|
* @example <propertyName>refresh</propertyName>
|
|
1219
|
-
* //
|
|
1220
|
-
*
|
|
1221
|
-
*
|
|
1222
|
-
* <>
|
|
1223
|
-
* <TelerikReportViewer />
|
|
1224
|
-
* <button onClick={() => viewer.commands.refresh.exec()}>Refresh</button>
|
|
1225
|
-
* </>
|
|
1226
|
-
* );
|
|
1287
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1288
|
+
* // Refresh the current report
|
|
1289
|
+
* reportViewerRef.current.commands.refresh.exec();
|
|
1227
1290
|
* @example <propertyName>refresh</propertyName>
|
|
1291
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1228
1292
|
* // Check if the command is enabled
|
|
1229
|
-
* const isEnabled =
|
|
1293
|
+
* const isEnabled = reportViewerRef.current.commands.refresh.enabled();
|
|
1230
1294
|
* @example <propertyName>refresh</propertyName>
|
|
1295
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1231
1296
|
* // Check if the command is checked
|
|
1232
|
-
* const isChecked =
|
|
1297
|
+
* const isChecked = reportViewerRef.current.commands.refresh.checked();
|
|
1298
|
+
*
|
|
1233
1299
|
* @property {ReportViewerCommand} goToFirstPage - Goes to the first page of the report.
|
|
1234
1300
|
* @example <propertyName>goToFirstPage</propertyName>
|
|
1235
|
-
* //
|
|
1236
|
-
*
|
|
1237
|
-
*
|
|
1238
|
-
* <>
|
|
1239
|
-
* <TelerikReportViewer />
|
|
1240
|
-
* <button onClick={() => viewer.commands.goToFirstPage.exec()}>First Page</button>
|
|
1241
|
-
* </>
|
|
1242
|
-
* );
|
|
1301
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1302
|
+
* // Navigate to the first page
|
|
1303
|
+
* reportViewerRef.current.commands.goToFirstPage.exec();
|
|
1243
1304
|
* @example <propertyName>goToFirstPage</propertyName>
|
|
1305
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1244
1306
|
* // Check if the command is enabled
|
|
1245
|
-
* const isEnabled =
|
|
1307
|
+
* const isEnabled = reportViewerRef.current.commands.goToFirstPage.enabled();
|
|
1246
1308
|
* @example <propertyName>goToFirstPage</propertyName>
|
|
1309
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1247
1310
|
* // Check if the command is checked
|
|
1248
|
-
* const isChecked =
|
|
1311
|
+
* const isChecked = reportViewerRef.current.commands.goToFirstPage.checked();
|
|
1312
|
+
*
|
|
1249
1313
|
* @property {ReportViewerCommand} goToPrevPage - Goes to the previous page of the report.
|
|
1250
1314
|
* @example <propertyName>goToPrevPage</propertyName>
|
|
1251
|
-
* //
|
|
1252
|
-
*
|
|
1253
|
-
*
|
|
1254
|
-
* <>
|
|
1255
|
-
* <TelerikReportViewer />
|
|
1256
|
-
* <button onClick={() => viewer.commands.goToPrevPage.exec()}>Previous</button>
|
|
1257
|
-
* </>
|
|
1258
|
-
* );
|
|
1315
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1316
|
+
* // Navigate to the previous page
|
|
1317
|
+
* reportViewerRef.current.commands.goToPrevPage.exec();
|
|
1259
1318
|
* @example <propertyName>goToPrevPage</propertyName>
|
|
1319
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1260
1320
|
* // Check if the command is enabled
|
|
1261
|
-
* const isEnabled =
|
|
1321
|
+
* const isEnabled = reportViewerRef.current.commands.goToPrevPage.enabled();
|
|
1262
1322
|
* @example <propertyName>goToPrevPage</propertyName>
|
|
1323
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1263
1324
|
* // Check if the command is checked
|
|
1264
|
-
* const isChecked =
|
|
1265
|
-
*
|
|
1325
|
+
* const isChecked = reportViewerRef.current.commands.goToPrevPage.checked();
|
|
1326
|
+
*
|
|
1327
|
+
* @property {ReportViewerCommand} goToPage - Goes to a specific page of the report. Pass the page number to exec().
|
|
1266
1328
|
* @example <propertyName>goToPage</propertyName>
|
|
1267
|
-
* //
|
|
1268
|
-
*
|
|
1269
|
-
*
|
|
1270
|
-
* <>
|
|
1271
|
-
* <TelerikReportViewer />
|
|
1272
|
-
* <button onClick={() => viewer.commands.goToPage.exec(5)}>Go to Page 5</button>
|
|
1273
|
-
* </>
|
|
1274
|
-
* );
|
|
1329
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1330
|
+
* // Navigate to page 5
|
|
1331
|
+
* reportViewerRef.current.commands.goToPage.exec(5);
|
|
1275
1332
|
* @example <propertyName>goToPage</propertyName>
|
|
1333
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1276
1334
|
* // Check if the command is enabled
|
|
1277
|
-
* const isEnabled =
|
|
1335
|
+
* const isEnabled = reportViewerRef.current.commands.goToPage.enabled();
|
|
1278
1336
|
* @example <propertyName>goToPage</propertyName>
|
|
1337
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1279
1338
|
* // Check if the command is checked
|
|
1280
|
-
* const isChecked =
|
|
1339
|
+
* const isChecked = reportViewerRef.current.commands.goToPage.checked();
|
|
1340
|
+
*
|
|
1281
1341
|
* @property {ReportViewerCommand} goToNextPage - Goes to the next page of the report.
|
|
1282
1342
|
* @example <propertyName>goToNextPage</propertyName>
|
|
1283
|
-
* //
|
|
1284
|
-
*
|
|
1285
|
-
*
|
|
1286
|
-
* <>
|
|
1287
|
-
* <TelerikReportViewer />
|
|
1288
|
-
* <button onClick={() => viewer.commands.goToNextPage.exec()}>Next</button>
|
|
1289
|
-
* </>
|
|
1290
|
-
* );
|
|
1343
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1344
|
+
* // Navigate to the next page
|
|
1345
|
+
* reportViewerRef.current.commands.goToNextPage.exec();
|
|
1291
1346
|
* @example <propertyName>goToNextPage</propertyName>
|
|
1347
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1292
1348
|
* // Check if the command is enabled
|
|
1293
|
-
* const isEnabled =
|
|
1349
|
+
* const isEnabled = reportViewerRef.current.commands.goToNextPage.enabled();
|
|
1294
1350
|
* @example <propertyName>goToNextPage</propertyName>
|
|
1351
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1295
1352
|
* // Check if the command is checked
|
|
1296
|
-
* const isChecked =
|
|
1353
|
+
* const isChecked = reportViewerRef.current.commands.goToNextPage.checked();
|
|
1354
|
+
*
|
|
1297
1355
|
* @property {ReportViewerCommand} goToLastPage - Goes to the last page of the report.
|
|
1298
1356
|
* @example <propertyName>goToLastPage</propertyName>
|
|
1299
|
-
* //
|
|
1300
|
-
*
|
|
1301
|
-
*
|
|
1302
|
-
* <>
|
|
1303
|
-
* <TelerikReportViewer />
|
|
1304
|
-
* <button onClick={() => viewer.commands.goToLastPage.exec()}>Last Page</button>
|
|
1305
|
-
* </>
|
|
1306
|
-
* );
|
|
1357
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1358
|
+
* // Navigate to the last page
|
|
1359
|
+
* reportViewerRef.current.commands.goToLastPage.exec();
|
|
1307
1360
|
* @example <propertyName>goToLastPage</propertyName>
|
|
1361
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1308
1362
|
* // Check if the command is enabled
|
|
1309
|
-
* const isEnabled =
|
|
1363
|
+
* const isEnabled = reportViewerRef.current.commands.goToLastPage.enabled();
|
|
1310
1364
|
* @example <propertyName>goToLastPage</propertyName>
|
|
1365
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1311
1366
|
* // Check if the command is checked
|
|
1312
|
-
* const isChecked =
|
|
1367
|
+
* const isChecked = reportViewerRef.current.commands.goToLastPage.checked();
|
|
1368
|
+
*
|
|
1313
1369
|
* @property {ReportViewerCommand} togglePrintPreview - Toggles between Print Preview and Interactive view modes.
|
|
1314
1370
|
* @example <propertyName>togglePrintPreview</propertyName>
|
|
1315
|
-
* //
|
|
1316
|
-
*
|
|
1317
|
-
*
|
|
1318
|
-
* <>
|
|
1319
|
-
* <TelerikReportViewer />
|
|
1320
|
-
* <button onClick={() => viewer.commands.togglePrintPreview.exec()}>Toggle Print Preview</button>
|
|
1321
|
-
* </>
|
|
1322
|
-
* );
|
|
1371
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1372
|
+
* // Toggle between Print Preview and Interactive modes
|
|
1373
|
+
* reportViewerRef.current.commands.togglePrintPreview.exec();
|
|
1323
1374
|
* @example <propertyName>togglePrintPreview</propertyName>
|
|
1375
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1324
1376
|
* // Check if the command is enabled
|
|
1325
|
-
* const isEnabled =
|
|
1377
|
+
* const isEnabled = reportViewerRef.current.commands.togglePrintPreview.enabled();
|
|
1326
1378
|
* @example <propertyName>togglePrintPreview</propertyName>
|
|
1327
|
-
* //
|
|
1328
|
-
*
|
|
1329
|
-
*
|
|
1379
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1380
|
+
* // Check if the command is checked (true when in Print Preview mode)
|
|
1381
|
+
* const isChecked = reportViewerRef.current.commands.togglePrintPreview.checked();
|
|
1382
|
+
*
|
|
1383
|
+
* @property {ReportViewerCommand} export - Exports the report. Pass the rendering extension name to exec() (e.g., "PDF", "XLSX", "CSV", "DOCX").
|
|
1384
|
+
* @example <propertyName>export</propertyName>
|
|
1385
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1386
|
+
* // Export the report as PDF
|
|
1387
|
+
* reportViewerRef.current.commands.export.exec("PDF");
|
|
1330
1388
|
* @example <propertyName>export</propertyName>
|
|
1331
|
-
* //
|
|
1332
|
-
* let viewer;
|
|
1333
|
-
* ReactDOM.render(
|
|
1334
|
-
* <>
|
|
1335
|
-
* <TelerikReportViewer />
|
|
1336
|
-
* <button onClick={() => viewer.commands.export.exec('PDF')}>Export PDF</button>
|
|
1337
|
-
* </>
|
|
1338
|
-
* );
|
|
1339
|
-
* @example <propertyName>export</propertyName>
|
|
1389
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1340
1390
|
* // Check if the command is enabled
|
|
1341
|
-
* const isEnabled =
|
|
1391
|
+
* const isEnabled = reportViewerRef.current.commands.export.enabled();
|
|
1342
1392
|
* @example <propertyName>export</propertyName>
|
|
1393
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1343
1394
|
* // Check if the command is checked
|
|
1344
|
-
* const isChecked =
|
|
1395
|
+
* const isChecked = reportViewerRef.current.commands.export.checked();
|
|
1396
|
+
*
|
|
1345
1397
|
* @property {ReportViewerCommand} print - Triggers the report printing.
|
|
1346
1398
|
* @example <propertyName>print</propertyName>
|
|
1347
|
-
* //
|
|
1348
|
-
*
|
|
1349
|
-
*
|
|
1350
|
-
* <>
|
|
1351
|
-
* <TelerikReportViewer />
|
|
1352
|
-
* <button onClick={() => viewer.commands.print.exec()}>Print</button>
|
|
1353
|
-
* </>
|
|
1354
|
-
* );
|
|
1399
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1400
|
+
* // Print the current report
|
|
1401
|
+
* reportViewerRef.current.commands.print.exec();
|
|
1355
1402
|
* @example <propertyName>print</propertyName>
|
|
1403
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1356
1404
|
* // Check if the command is enabled
|
|
1357
|
-
* const isEnabled =
|
|
1405
|
+
* const isEnabled = reportViewerRef.current.commands.print.enabled();
|
|
1358
1406
|
* @example <propertyName>print</propertyName>
|
|
1407
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1359
1408
|
* // Check if the command is checked
|
|
1360
|
-
* const isChecked =
|
|
1409
|
+
* const isChecked = reportViewerRef.current.commands.print.checked();
|
|
1410
|
+
*
|
|
1361
1411
|
* @property {ReportViewerCommand} toggleDocumentMap - Shows or hides the document map.
|
|
1362
1412
|
* @example <propertyName>toggleDocumentMap</propertyName>
|
|
1363
|
-
* //
|
|
1364
|
-
*
|
|
1365
|
-
*
|
|
1366
|
-
* <>
|
|
1367
|
-
* <TelerikReportViewer />
|
|
1368
|
-
* <button onClick={() => viewer.commands.toggleDocumentMap.exec()}>Toggle Document Map</button>
|
|
1369
|
-
* </>
|
|
1370
|
-
* );
|
|
1413
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1414
|
+
* // Toggle the document map visibility
|
|
1415
|
+
* reportViewerRef.current.commands.toggleDocumentMap.exec();
|
|
1371
1416
|
* @example <propertyName>toggleDocumentMap</propertyName>
|
|
1417
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1372
1418
|
* // Check if the command is enabled
|
|
1373
|
-
* const isEnabled =
|
|
1419
|
+
* const isEnabled = reportViewerRef.current.commands.toggleDocumentMap.enabled();
|
|
1374
1420
|
* @example <propertyName>toggleDocumentMap</propertyName>
|
|
1375
|
-
* //
|
|
1376
|
-
*
|
|
1421
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1422
|
+
* // Check if the command is checked (true when document map is visible)
|
|
1423
|
+
* const isChecked = reportViewerRef.current.commands.toggleDocumentMap.checked();
|
|
1424
|
+
*
|
|
1377
1425
|
* @property {ReportViewerCommand} toggleParametersArea - Shows or hides the parameters area.
|
|
1378
1426
|
* @example <propertyName>toggleParametersArea</propertyName>
|
|
1379
|
-
* //
|
|
1380
|
-
*
|
|
1381
|
-
*
|
|
1382
|
-
* <>
|
|
1383
|
-
* <TelerikReportViewer />
|
|
1384
|
-
* <button onClick={() => viewer.commands.toggleParametersArea.exec()}>Toggle Parameters</button>
|
|
1385
|
-
* </>
|
|
1386
|
-
* );
|
|
1427
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1428
|
+
* // Toggle the parameters area visibility
|
|
1429
|
+
* reportViewerRef.current.commands.toggleParametersArea.exec();
|
|
1387
1430
|
* @example <propertyName>toggleParametersArea</propertyName>
|
|
1431
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1388
1432
|
* // Check if the command is enabled
|
|
1389
|
-
* const isEnabled =
|
|
1433
|
+
* const isEnabled = reportViewerRef.current.commands.toggleParametersArea.enabled();
|
|
1390
1434
|
* @example <propertyName>toggleParametersArea</propertyName>
|
|
1391
|
-
* //
|
|
1392
|
-
*
|
|
1393
|
-
*
|
|
1435
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1436
|
+
* // Check if the command is checked (true when parameters area is visible)
|
|
1437
|
+
* const isChecked = reportViewerRef.current.commands.toggleParametersArea.checked();
|
|
1438
|
+
*
|
|
1439
|
+
* @property {ReportViewerCommand} zoomIn - Zooms in on the report.
|
|
1394
1440
|
* @example <propertyName>zoomIn</propertyName>
|
|
1395
|
-
* //
|
|
1396
|
-
*
|
|
1397
|
-
*
|
|
1398
|
-
* <>
|
|
1399
|
-
* <TelerikReportViewer />
|
|
1400
|
-
* <button onClick={() => viewer.commands.zoomIn.exec()}>Zoom In</button>
|
|
1401
|
-
* </>
|
|
1402
|
-
* );
|
|
1441
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1442
|
+
* // Zoom in on the report
|
|
1443
|
+
* reportViewerRef.current.commands.zoomIn.exec();
|
|
1403
1444
|
* @example <propertyName>zoomIn</propertyName>
|
|
1445
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1404
1446
|
* // Check if the command is enabled
|
|
1405
|
-
* const isEnabled =
|
|
1447
|
+
* const isEnabled = reportViewerRef.current.commands.zoomIn.enabled();
|
|
1406
1448
|
* @example <propertyName>zoomIn</propertyName>
|
|
1449
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1407
1450
|
* // Check if the command is checked
|
|
1408
|
-
* const isChecked =
|
|
1409
|
-
*
|
|
1451
|
+
* const isChecked = reportViewerRef.current.commands.zoomIn.checked();
|
|
1452
|
+
*
|
|
1453
|
+
* @property {ReportViewerCommand} zoomOut - Zooms out of the report.
|
|
1410
1454
|
* @example <propertyName>zoomOut</propertyName>
|
|
1411
|
-
* //
|
|
1412
|
-
*
|
|
1413
|
-
*
|
|
1414
|
-
* <>
|
|
1415
|
-
* <TelerikReportViewer />
|
|
1416
|
-
* <button onClick={() => viewer.commands.zoomOut.exec()}>Zoom Out</button>
|
|
1417
|
-
* </>
|
|
1418
|
-
* );
|
|
1455
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1456
|
+
* // Zoom out of the report
|
|
1457
|
+
* reportViewerRef.current.commands.zoomOut.exec();
|
|
1419
1458
|
* @example <propertyName>zoomOut</propertyName>
|
|
1459
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1420
1460
|
* // Check if the command is enabled
|
|
1421
|
-
* const isEnabled =
|
|
1461
|
+
* const isEnabled = reportViewerRef.current.commands.zoomOut.enabled();
|
|
1422
1462
|
* @example <propertyName>zoomOut</propertyName>
|
|
1463
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1423
1464
|
* // Check if the command is checked
|
|
1424
|
-
* const isChecked =
|
|
1425
|
-
*
|
|
1465
|
+
* const isChecked = reportViewerRef.current.commands.zoomOut.checked();
|
|
1466
|
+
*
|
|
1467
|
+
* @property {ReportViewerCommand} zoom - Zooms to a specified ratio. Pass the zoom ratio to exec() (e.g., 1.5 for 150%).
|
|
1426
1468
|
* @example <propertyName>zoom</propertyName>
|
|
1427
|
-
* //
|
|
1428
|
-
*
|
|
1429
|
-
*
|
|
1430
|
-
* <>
|
|
1431
|
-
* <TelerikReportViewer />
|
|
1432
|
-
* <button onClick={() => viewer.commands.zoom.exec(1.5)}>Zoom 150%</button>
|
|
1433
|
-
* </>
|
|
1434
|
-
* );
|
|
1469
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1470
|
+
* // Zoom to 150%
|
|
1471
|
+
* reportViewerRef.current.commands.zoom.exec(1.5);
|
|
1435
1472
|
* @example <propertyName>zoom</propertyName>
|
|
1473
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1436
1474
|
* // Check if the command is enabled
|
|
1437
|
-
* const isEnabled =
|
|
1475
|
+
* const isEnabled = reportViewerRef.current.commands.zoom.enabled();
|
|
1438
1476
|
* @example <propertyName>zoom</propertyName>
|
|
1477
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1439
1478
|
* // Check if the command is checked
|
|
1440
|
-
* const isChecked =
|
|
1441
|
-
*
|
|
1479
|
+
* const isChecked = reportViewerRef.current.commands.zoom.checked();
|
|
1480
|
+
*
|
|
1481
|
+
* @property {ReportViewerCommand} toggleZoomMode - Cycles the zoom mode of the report between FIT_PAGE_WIDTH, FIT_PAGE, and SPECIFIC.
|
|
1442
1482
|
* @example <propertyName>toggleZoomMode</propertyName>
|
|
1443
|
-
* //
|
|
1444
|
-
*
|
|
1445
|
-
*
|
|
1446
|
-
* <>
|
|
1447
|
-
* <TelerikReportViewer />
|
|
1448
|
-
* <button onClick={() => viewer.commands.toggleZoomMode.exec()}>Toggle Zoom Mode</button>
|
|
1449
|
-
* </>
|
|
1450
|
-
* );
|
|
1483
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1484
|
+
* // Cycle to the next zoom mode
|
|
1485
|
+
* reportViewerRef.current.commands.toggleZoomMode.exec();
|
|
1451
1486
|
* @example <propertyName>toggleZoomMode</propertyName>
|
|
1487
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1452
1488
|
* // Check if the command is enabled
|
|
1453
|
-
* const isEnabled =
|
|
1489
|
+
* const isEnabled = reportViewerRef.current.commands.toggleZoomMode.enabled();
|
|
1454
1490
|
* @example <propertyName>toggleZoomMode</propertyName>
|
|
1491
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1455
1492
|
* // Check if the command is checked
|
|
1456
|
-
* const isChecked =
|
|
1457
|
-
*
|
|
1458
|
-
* @example <propertyName>toggleSideMenu</propertyName>
|
|
1459
|
-
* // Execute the command
|
|
1460
|
-
* let viewer;
|
|
1461
|
-
* ReactDOM.render(
|
|
1462
|
-
* <>
|
|
1463
|
-
* <TelerikReportViewer />
|
|
1464
|
-
* <button onClick={() => viewer.commands.toggleSideMenu.exec()}>Toggle Side Menu</button>
|
|
1465
|
-
* </>
|
|
1466
|
-
* );
|
|
1467
|
-
* @example <propertyName>toggleSideMenu</propertyName>
|
|
1468
|
-
* // Check if the command is enabled
|
|
1469
|
-
* const isEnabled = viewer.commands.toggleSideMenu.enabled();
|
|
1470
|
-
* @example <propertyName>toggleSideMenu</propertyName>
|
|
1471
|
-
* // Check if the command is checked
|
|
1472
|
-
* const isChecked = viewer.commands.toggleSideMenu.checked();
|
|
1493
|
+
* const isChecked = reportViewerRef.current.commands.toggleZoomMode.checked();
|
|
1494
|
+
*
|
|
1473
1495
|
* @property {ReportViewerCommand} toggleSearchDialog - Shows or hides the search dialog.
|
|
1474
1496
|
* @example <propertyName>toggleSearchDialog</propertyName>
|
|
1475
|
-
* //
|
|
1476
|
-
*
|
|
1477
|
-
*
|
|
1478
|
-
* <>
|
|
1479
|
-
* <TelerikReportViewer />
|
|
1480
|
-
* <button onClick={() => viewer.commands.toggleSearchDialog.exec()}>Toggle Search</button>
|
|
1481
|
-
* </>
|
|
1482
|
-
* );
|
|
1497
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1498
|
+
* // Toggle the search dialog visibility
|
|
1499
|
+
* reportViewerRef.current.commands.toggleSearchDialog.exec();
|
|
1483
1500
|
* @example <propertyName>toggleSearchDialog</propertyName>
|
|
1501
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1484
1502
|
* // Check if the command is enabled
|
|
1485
|
-
* const isEnabled =
|
|
1503
|
+
* const isEnabled = reportViewerRef.current.commands.toggleSearchDialog.enabled();
|
|
1486
1504
|
* @example <propertyName>toggleSearchDialog</propertyName>
|
|
1487
|
-
* //
|
|
1488
|
-
*
|
|
1505
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1506
|
+
* // Check if the command is checked (true when search dialog is visible)
|
|
1507
|
+
* const isChecked = reportViewerRef.current.commands.toggleSearchDialog.checked();
|
|
1508
|
+
*
|
|
1489
1509
|
* @property {ReportViewerCommand} stopRendering - Stops the rendering of the current report.
|
|
1490
1510
|
* @example <propertyName>stopRendering</propertyName>
|
|
1491
|
-
* //
|
|
1492
|
-
*
|
|
1493
|
-
*
|
|
1494
|
-
* <>
|
|
1495
|
-
* <TelerikReportViewer />
|
|
1496
|
-
* <button onClick={() => viewer.commands.stopRendering.exec()}>Stop Rendering</button>
|
|
1497
|
-
* </>
|
|
1498
|
-
* );
|
|
1511
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1512
|
+
* // Stop the current report rendering
|
|
1513
|
+
* reportViewerRef.current.commands.stopRendering.exec();
|
|
1499
1514
|
* @example <propertyName>stopRendering</propertyName>
|
|
1515
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1500
1516
|
* // Check if the command is enabled
|
|
1501
|
-
* const isEnabled =
|
|
1517
|
+
* const isEnabled = reportViewerRef.current.commands.stopRendering.enabled();
|
|
1502
1518
|
* @example <propertyName>stopRendering</propertyName>
|
|
1519
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1503
1520
|
* // Check if the command is checked
|
|
1504
|
-
* const isChecked =
|
|
1521
|
+
* const isChecked = reportViewerRef.current.commands.stopRendering.checked();
|
|
1522
|
+
*
|
|
1505
1523
|
* @property {ReportViewerCommand} toggleSendEmailDialog - Shows or hides the send email dialog.
|
|
1506
1524
|
* @example <propertyName>toggleSendEmailDialog</propertyName>
|
|
1507
|
-
* //
|
|
1508
|
-
*
|
|
1509
|
-
*
|
|
1510
|
-
* <>
|
|
1511
|
-
* <TelerikReportViewer />
|
|
1512
|
-
* <button onClick={() => viewer.commands.toggleSendEmailDialog.exec()}>Toggle Send Email</button>
|
|
1513
|
-
* </>
|
|
1514
|
-
* );
|
|
1525
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1526
|
+
* // Toggle the send email dialog visibility
|
|
1527
|
+
* reportViewerRef.current.commands.toggleSendEmailDialog.exec();
|
|
1515
1528
|
* @example <propertyName>toggleSendEmailDialog</propertyName>
|
|
1529
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1516
1530
|
* // Check if the command is enabled
|
|
1517
|
-
* const isEnabled =
|
|
1531
|
+
* const isEnabled = reportViewerRef.current.commands.toggleSendEmailDialog.enabled();
|
|
1518
1532
|
* @example <propertyName>toggleSendEmailDialog</propertyName>
|
|
1519
|
-
* //
|
|
1520
|
-
*
|
|
1533
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1534
|
+
* // Check if the command is checked (true when send email dialog is visible)
|
|
1535
|
+
* const isChecked = reportViewerRef.current.commands.toggleSendEmailDialog.checked();
|
|
1536
|
+
*
|
|
1521
1537
|
* @property {ReportViewerCommand} toggleAiPromptDialog - Shows or hides the AI prompt dialog.
|
|
1522
1538
|
* @example <propertyName>toggleAiPromptDialog</propertyName>
|
|
1523
|
-
* //
|
|
1524
|
-
*
|
|
1525
|
-
*
|
|
1526
|
-
* <>
|
|
1527
|
-
* <TelerikReportViewer />
|
|
1528
|
-
* <button onClick={() => viewer.commands.toggleAiPromptDialog.exec()}>Toggle AI Prompt</button>
|
|
1529
|
-
* </>
|
|
1530
|
-
* );
|
|
1539
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1540
|
+
* // Toggle the AI prompt dialog visibility
|
|
1541
|
+
* reportViewerRef.current.commands.toggleAiPromptDialog.exec();
|
|
1531
1542
|
* @example <propertyName>toggleAiPromptDialog</propertyName>
|
|
1543
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1532
1544
|
* // Check if the command is enabled
|
|
1533
|
-
* const isEnabled =
|
|
1545
|
+
* const isEnabled = reportViewerRef.current.commands.toggleAiPromptDialog.enabled();
|
|
1534
1546
|
* @example <propertyName>toggleAiPromptDialog</propertyName>
|
|
1535
|
-
* //
|
|
1536
|
-
*
|
|
1547
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1548
|
+
* // Check if the command is checked (true when AI prompt dialog is visible)
|
|
1549
|
+
* const isChecked = reportViewerRef.current.commands.toggleAiPromptDialog.checked();
|
|
1537
1550
|
*/
|