EJ2 DataGrid + ReportViewer + Globalization\Localization = Error?

Hi

I have Core App, with EJ2 components, with globalization/localization enabled, and its working fine. I need to add Report Viewer, so I added scripts to my _Layout:

<!-- Syncfusion Essential JS 2 Scripts -->
<script src="https://cdn.syncfusion.com/ej2/dist/ej2.min.js"></script>

@* BoldReports Scripts *@

<script src="https://cdn.boldreports.com/2.3.39/scripts/common/ej2-base.min.js"></script>
<script src="https://cdn.boldreports.com/2.3.39/scripts/common/ej2-data.min.js"></script>
<script src="https://cdn.boldreports.com/2.3.39/scripts/common/ej2-pdf-export.min.js"></script>
<script src="https://cdn.boldreports.com/2.3.39/scripts/common/ej2-svg-base.min.js"></script>
<script src="https://cdn.boldreports.com/2.3.39/scripts/data-visualization/ej2-lineargauge.min.js"></script>
<script src="https://cdn.boldreports.com/2.3.39/scripts/data-visualization/ej2-circulargauge.min.js"></script>

<!--Render the map item. Add this script only if your report contains the map report item.-->
<script src="https://cdn.boldreports.com/2.3.39/scripts/data-visualization/ej2-maps.min.js"></script>

<script src="https://cdn.boldreports.com/2.3.39/scripts/common/bold.reports.common.min.js"></script>
<script src="https://cdn.boldreports.com/2.3.39/scripts/common/bold.reports.widgets.min.js"></script>

<!--Render the chart item. Add this script only if your report contains the chart report item.-->
<script src="https://cdn.boldreports.com/2.3.39/scripts/data-visualization/ej.chart.min.js"></script>

<!-- Report Viewer component script-->
<script src="https://cdn.boldreports.com/2.3.39/scripts/bold.report-viewer.min.js"></script>

And at the end of _Layout:

<script src="https://cdn.boldreports.com/2.3.39/scripts/l10n/ej.localetexts.pl-PL.min.js"></script>
<script src="https://cdn.boldreports.com/2.3.39/scripts/i18n/ej.culture.pl-PL.min.js"></script>
And translations for ReportViewer is working fine, but there are two problems:

1. Every grids with URL DataManager stop working, there is error:

Uncaught TypeError: u is undefined
    processResponse https://cdn.boldreports.com/2.3.39/scripts/common/ej2-data.min.js:10
    executeLocal https://cdn.syncfusion.com/ej2/dist/ej2.min.js:10
    executeQuery https://cdn.syncfusion.com/ej2/dist/ej2.min.js:10
    setTimeout handler*ej</pj</e.nextTick https://cdn.syncfusion.com/ej2/dist/ej2.min.js:10
    executeQuery https://cdn.syncfusion.com/ej2/dist/ej2.min.js:10
    executeQuery https://cdn.syncfusion.com/ej2/dist/ej2.min.js:10
    insert https://cdn.syncfusion.com/ej2/dist/ej2.min.js:10
    getData https://cdn.syncfusion.com/ej2/dist/ej2.min.js:10
    refreshDataManager https://cdn.syncfusion.com/ej2/dist/ej2.min.js:10
    render https://cdn.syncfusion.com/ej2/dist/ej2.min.js:10
    gridRender https://cdn.syncfusion.com/ej2/dist/ej2.min.js:10
    render https://cdn.syncfusion.com/ej2/dist/ej2.min.js:10
    appendTo https://cdn.syncfusion.com/ej2/dist/ej2.min.js:10
    <anonymous> https://localhost:5051/Planning/Technologies:508
ej2-data.min.js:10:32382

2. There is no more any globalizations/localizations in any EJ2 controls except ReportViewer, without any errors.

My scripts are:

document.addEventListener('DOMContentLoaded', function () {    
ejs.base.L10n.load(translations);
loadCultureFiles('pl');
ejs.base.setCulture('pl');
});
function loadCultureFiles(name) {

var files = ['ca-gregorian.json', 'numbers.json', 'timeZoneNames.json'];
if (name === 'ar') {
files.push('numberingSystems.json');
}
var loader = ejs.base.loadCldr;

var loadCulture = function (prop) {
var val, ajax;
if (name === 'ar' && prop === files.length - 1) {
ajax = new ejs.base.Ajax(location.origin + '/localization/cldr-data/supplemental/' + files[prop], 'GET', false);
} else {
ajax = new ejs.base.Ajax(location.origin + '/localization/cldr-data/main/' + name + '/' + files[prop], 'GET', false);
}
ajax.onSuccess = function (value) {
val = value;
};
ajax.send();
loader(JSON.parse(val));
};

for (var prop = 0; prop < files.length; prop++) {
loadCulture(prop);
}
}


















4 Replies 1 reply marked as answer

TO Tomasz September 25, 2020 01:12 PM UTC

Can anyone help, how to put EJ2, ReportViewer and globalization/localization together?


MS Manivel Sellamuthu Syncfusion Team September 29, 2020 11:17 AM UTC

Hi Tomasz, 

Sorry for the delay getting back to you. 

Since you are referring the ej2.min.js no need to refer the highlighted scripts from bold reports. The root cause of the issue is using two different versions of EJ2 within application. If you are already using the EJ2 controls with your application then you can refer the latest one from EJ2 alone. 



Please let us know, if you need further assistance. 

Regards, 
Manivel 


Marked as answer

TO Tomasz September 29, 2020 11:33 AM UTC

Thank you, now it is working :)


MS Manivel Sellamuthu Syncfusion Team September 30, 2020 05:14 AM UTC

Hi Tomasz, 

Thanks for your update.   

We are happy to hear that the problem has been resolved by the provided suggestion..   

Please let us know, if you need further assistance. As always, we will be happy to assist you. 

Regards, 
Manivel 


Loader.
Up arrow icon