Cannot read property 'Enum' of undefined in Angular

Stimulsoft Reports.JS discussion
Post Reply
charis.collexe
Posts: 2
Joined: Thu Jan 30, 2020 5:45 am

Cannot read property 'Enum' of undefined in Angular

Post by charis.collexe »

Hi, Good Day all.

I have a problem with Stimulsoft Reports for JS in Angular. I already install the module into node_modules with yarn add stimulsoft-reports-js and get the latest version 2020.1.1

Then I tried to make a simple view in Html and Typescript, following to this official Stimulsoft sample -> https://github.com/stimulsoft/Samples-J ... mponent.ts

But after compiled and running, appear some error in the console,

Uncaught TypeError: Cannot read property 'Enum' of undefined
at stimulsoft.viewer.js:11
at stimulsoft.viewer.js:11
at stimulsoft.viewer.js:11
at stimulsoft.viewer.js:11
at stimulsoft.viewer.js:11

report.component.html:20 ERROR TypeError: Cannot read property 'StiLicense' of undefined
at ReportComponent.push../src/app/transaction/report/report.component.ts.ReportComponent.ngOnInit (report.component.ts:30)
at checkAndUpdateDirectiveInline (vendor.js:68931)
at checkAndUpdateNodeInline (vendor.js:77329)
at checkAndUpdateNode (vendor.js:77291)
at debugCheckAndUpdateNode (vendor.js:77925)
at debugCheckDirectivesFn (vendor.js:77885)
at Object.updateDirectives (report.component.html:20)
at Object.debugUpdateDirectives [as updateDirectives] (vendor.js:77877)
at checkAndUpdateView (vendor.js:77273)
at callViewAction (vendor.js:77514)

Can someone help me?

Thank you in advice :)
Lech Kulikowski
Posts: 7292
Joined: Tue Mar 20, 2018 5:34 am

Re: Cannot read property 'Enum' of undefined in Angular

Post by Lech Kulikowski »

Hello,

Please try to add separate scripts and styles, not via npm, but manually. they're also specified in angular-cli.json.
https://github.com/stimulsoft/Samples-J ... r-cli.json

Also, you can try to use publish feature:
https://publish.stimulsoft.com/

Thank you.
charis.collexe
Posts: 2
Joined: Thu Jan 30, 2020 5:45 am

Re: Cannot read property 'Enum' of undefined in Angular

Post by charis.collexe »

Lech Kulikowski wrote: Mon Feb 03, 2020 9:03 am Hello,

Please try to add separate scripts and styles, not via npm, but manually. they're also specified in angular-cli.json.
https://github.com/stimulsoft/Samples-J ... r-cli.json

Also, you can try to use publish feature:
https://publish.stimulsoft.com/

Thank you.
Thank you so much. Already fix this one
Lech Kulikowski
Posts: 7292
Joined: Tue Mar 20, 2018 5:34 am

Re: Cannot read property 'Enum' of undefined in Angular

Post by Lech Kulikowski »

Hello

We are always glad to help you!
Please let us know if you need any additional help.

Thank you.
Post Reply