Ticket T652551
Visible to All Users

Unable to fetch report design from server side to client side

created 7 years ago

Hello,

I have an Angular 6 application which has Devextreme Document Viewer fucntionality and a ASP.NET Web API application (Devexpress Reporting module is integrated) for Report Design purpose.

I am able to generate Document Viewer. After page initialization we are making a Web API call to fetch report design. The call is hitting API endpoint and an instance of XtraReport is also getting created in the process. We are returning the object as JSON.

But the client application (browser) is receiving NULL.

I have followed Devexpress Report Documentation. Now I seek your assistance in rendering the report in document viewer and also the right configuration & steps in doing so.

For referential purpose I am attaching both the projects (Angular & Web API).

Thank you,
Chayan Kar

Answers approved by DevExpress Support

created 7 years ago

Hi Chayan,

I have reviewed your project on my side and found that webpack.config,js file is used to register Globalize library in your application. Note that, in this case, the web pack was required to overcome a known Angular CLI issue that was discussed in the Can't get Globalize to work inside an Angular CLI project thread. But this issue was finally resolved in Angular CLI 6, so now, it is not necessary to call the ng eject command. Check the aforementioned thread for more details.
So to register a Globalize package in your application it is sufficient to add the following code to tsconfig.json file when Angular CLI 6 is used:

JavaScript
"paths": { "globalize": [ "node_modules/globalize/dist/globalize" ], "globalize/*": [ "node_modules/globalize/dist/globalize/*" ], "cldr": [ "node_modules/cldrjs/dist/cldr" ], "cldr/*": [ "node_modules/cldrjs/dist/cldr/*" ] }

Also, I found that old versions of devexpress-reporting, devextremejquery and jquery-ui packages are referenced in your project's package.json file. As your server-side application uses DevExpress components of version 18.1, the packages should be also updated:

JavaScript
"devexpress-reporting": "~18.1.4", "devextreme": "~18.1.4", "jquery": "^3.1.1", "jquery-ui": "^1.12.1"

After doing that, remove the package-lock.json file from your project and re-install the npm packages by clearing the node_modules folder and running the npm install command.

In any case, I attached a workable sample project that demonstrates the correct configuration for Angular CLI 6.

    Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

    Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.