This is a migrated thread and some comments may be shown as answers.

Export in Angular Report Viewer is not working

2 Answers 204 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Kanoo
Top achievements
Rank 1
Kanoo asked on 05 Jan 2019, 01:10 PM

I noticed that the Export functionality is not working in Angular Report Viewer at all for all reports. I got the below exception in the browser If I click on any export button.

ERROR Error: Uncaught (in promise): TypeError: Illegal invocation
TypeError: Illegal invocation
    at zone.js:2984
    at proto.(anonymous function) (http://service-url:12334/polyfills.4dc437127b0fb9a93699.js:9074:24)
    at telerikReportViewer.js:1680
    at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke (zone.js:388)
    at Object.onInvoke (core.js:16156)
    at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke (zone.js:387)
    at Zone.push../node_modules/zone.js/dist/zone.js.Zone.run (zone.js:138)
    at zone.js:872
    at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:421)
    at Object.onInvokeTask (core.js:16147)
    at resolvePromise (zone.js:814)
    at zone.js:877
    at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:421)
    at Object.onInvokeTask (core.js:16147)
    at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:420)
    at Zone.push../node_modules/zone.js/dist/zone.js.Zone.runTask (zone.js:188)
    at drainMicroTaskQueue (zone.js:595)
    at ZoneTask.push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask [as invoke] (zone.js:500)
    at invokeTask (zone.js:1540)
    at XMLHttpRequest.globalZoneAwareCallback (zone.js:1566)

These are my packages related to the topic

"@agm/core": "1.0.0-beta.5",
"@angular/animations": "7.1.3",
"@angular/cdk": "7.1.1",
"@angular/common": "7.1.3",
"@angular/compiler": "7.1.3",
"@angular/core": "7.1.3",
"@angular/http": "7.1.3",
"@angular/platform-browser": "7.1.3",
"@angular/platform-browser-dynamic": "7.1.3",
"@angular/router": "7.1.3",
"@progress/kendo-angular-charts": "3.5.0",
"@progress/kendo-angular-intl": "1.6.0",
"@progress/kendo-angular-l10n": "1.3.0",
"@progress/kendo-angular-upload": "^4.2.2",
"@progress/kendo-drawing": "1.5.7",
"@progress/kendo-theme-material": "1.5.0",
"@progress/telerik-angular-report-viewer": "5.18.1129",
"@swimlane/ngx-datatable": "14.0.0",
"jquery": "3.2.1",
"kendo-ui-core": "2018.3.1107",
"npm": "6.5.0",
"rxjs": "6.2.1",
"rxjs-compat": "^6.0.0",
"zone.js": "0.8.26"

 

 

"@angular/cli": "7.1.3",

"typescript": "3.1.6",

"@angular-devkit/build-angular": "~0.11.0",
"@angular-devkit/core": "0.7.4",
"@angular-devkit/schematics": "0.7.4",
"@angular/cli": "7.1.3",
"@angular/compiler-cli": "7.1.3",
"@angular/language-service": "7.1.3",

Thanks,

2 Answers, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 09 Jan 2019, 04:16 PM
Hi Kanoo,

I tested with an Angular project (Angular CLI 7.1.1) and the export functionality of the viewer is working properly on our side.
From the error Stack Trace we cannot diagnose the problem.
The issue is new for us and we would like to investigate it locally. Consider opening a support ticket and attaching a sample project demonstrating the problem.

Regards,
Todor
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Kanoo
Top achievements
Rank 1
answered on 15 Jan 2019, 01:58 PM

I really can't isolate the issue and create a separate solution for it and my application is big. However I managed to resolve the issue by handle the control export callback and download the file to the user without window.open which it seems to be the issue.

Here is the required code

In the HTML code of the report viewer control [exportEnd]="onExportEnd"

In the Type script of the component 

onExportEnd(e, args) {
location.href = args.url;
args.handled = true;
}

My it help someone.

Tags
General Discussions
Asked by
Kanoo
Top achievements
Rank 1
Answers by
Todor
Telerik team
Kanoo
Top achievements
Rank 1
Share this question
or